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

fix: skip finalizing anonymous class fields in FinalizeLocalVariables #182

Merged
merged 9 commits into from
Oct 2, 2023
Merged

fix: skip finalizing anonymous class fields in FinalizeLocalVariables #182

merged 9 commits into from
Oct 2, 2023

Conversation

AlejandroBertolo
Copy link
Contributor

@AlejandroBertolo AlejandroBertolo commented Oct 2, 2023

What's changed?

Variables identified as fields of anonymous classes will be skipped in FinalizeLocalVariables recipe.

What's your motivation?

Fixes #181

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

There is perhaps a better way of identifying anonymous classes.

Anyone you would like to review specifically?

@timtebeek

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • no new files were added
  • I've used the IntelliJ IDEA auto-formatter on affected files

@AlejandroBertolo AlejandroBertolo changed the title fix: skip finalizing anonymous class fields fix: skip finalizing anonymous class fields in FinalizeLocalVariables Oct 2, 2023
@AlejandroBertolo
Copy link
Contributor Author

Found a simpler way to identify anonymous class parents, as seen in MissingOverrideAnnotation recipe.
Should do the trick.

@timtebeek timtebeek added the bug Something isn't working label Oct 2, 2023
@timtebeek
Copy link
Contributor

Thanks for the quick work on this!

@timtebeek timtebeek merged commit ad96b86 into openrewrite:main Oct 2, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

FinalizeLocalVariables fails when processing fields of anonymous classes
2 participants