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

Can not replace Java record argument annotations with JavaTemplate #4939

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

desantisernesto
Copy link

What's changed?

Unit tests reproducing the issue described in #4634

What's your motivation?

Fix the ReplaceAnnotation recipe to work over java records.

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

I implemented 2 unit tests, the first trying to replicate the other tests in the class by defining the recipe as an anonymous class overriding visitAnnotation method; the second one by using the ReplaceAnnotation recipe.

Anyone you would like to review specifically?

@timtebeek

Have you considered any alternatives or workarounds?

Any additional context

#4634
https://rewriteoss.slack.com/archives/C01A843MWG5/p1737552703678879

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek timtebeek changed the title 4634 unit tests reproducing the failure parsing a java record Can not replace Java record argument annotations with JavaTemplate Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant