-
Notifications
You must be signed in to change notification settings - Fork 101
Some compilation issues are occuring after running switch pattern matching recipe #775
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- src/test/java/org/openrewrite/java/migrate/util/MigrateCollectionsSingletonMapTest.java
- lines 108-108
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- src/test/java/org/openrewrite/java/migrate/util/MigrateCollectionsSingletonMapTest.java
- lines 108-108
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- src/test/java/org/openrewrite/java/migrate/util/MigrateCollectionsSingletonMapTest.java
- lines 108-108
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the isolated fixes here! Makes reviewing a lot easier.
What's changed?
If any of the branches returns a value, we do (for now) not convert it to a switch as it is invalid.
Besides this change: If any of the values throws, we do allow this.
We used to unwrap if-statements if they were the only one -> no longer happening as only expressions and Throws are allowed to be written in that syntax.
I know we can enhance to do return from switch but I first want to stabilize the existing recipe before working on:
What's your motivation?
Clean up compilation issues occuring during run of the recipe.
Anyone you would like to review specifically?
@timtebeek
Checklist