-
Notifications
You must be signed in to change notification settings - Fork 95
Fix LombokValToFinalVar
in loops
#768
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
base: main
Are you sure you want to change the base?
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/lombok/LombokValToFinalVarTest.java
- lines 20-21
src/test/java/org/openrewrite/java/migrate/lombok/LombokValToFinalVarTest.java
Outdated
Show resolved
Hide resolved
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/lombok/LombokValToFinalVarTest.java
- lines 21-21
src/test/java/org/openrewrite/java/migrate/lombok/LombokValToFinalVarTest.java
Outdated
Show resolved
Hide resolved
This (now) isolated change can already be merged I think, but in chat we said to leave the final review to @jkschneider (no rush). |
What's changed?
LombokValToFinalVar
now avoids useingJavaTemplate
in for each loops were type attribution is not secure enough and parsing might fail.What's your motivation?
fix handling in for each loops
Anything in particular you'd like reviewers to focus on?
We assumed that
for(val s : strings)
is better migrated tofor(var s : strings)
thanfor(final var s : strings)
as it more comply with the common usage.Anyone you would like to review specifically?
Have you considered any alternatives or workarounds?
Fixing parser issue in template logic connected to
val
in loops, seelombok.val
Support rewrite#5637Any additional context
Checklist