Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't include diff in exception in Result #4997

Merged
merged 3 commits into from
Feb 7, 2025

Conversation

kmccarp
Copy link
Contributor

@kmccarp kmccarp commented Feb 7, 2025

What's changed? / What's your motivation?

In order to allow clients of OpenRewrite to decide whether to include (or not) the diff text when a source file changed but no changes were reported, extract the logic to a new Exception, UnknownSourceFileChangeException, passing in the SourceFile and diff.

Anything in particular you'd like reviewers to focus on?

N/A

Anyone you would like to review specifically?

N/A

Have you considered any alternatives or workarounds?

The workaround would be to read the text of the error message, which is error- and change-prone.

Any additional context

N/A

Checklist

- [ ] I've added unit tests to cover both positive and negative cases

In order to allow clients of OpenRewrite to decide whether to include
(or not) the diff text when a source file changed but no changes were
reported, extract the logic to a new `Exception`, `UnknownSourceFileChangeException`,
passing in the `SourceFile` and diff.
@timtebeek
Copy link
Contributor

Failures seem unrelated; merging.

@timtebeek timtebeek merged commit 332c700 into openrewrite:main Feb 7, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants