-
Notifications
You must be signed in to change notification settings - Fork 360
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
AddOrUpdateAnnotationAttribute
not working with nested annotations
#4765
Comments
Hi @danielshamis ; Looks like the recipe was missing a call to |
Hi, thank you for your quick response! Unfortunately I can't use external Maven repositories. Furthermore I couldn't find the updated snapshot version in nexus. To give more context to my issue, I am now using the latest available version of the maven plugin (5.46.2) but the problem persists. I am using declarative yaml format like this to add new attributes: recipeList:
-org.openrewrite.java.AddOrUpdateAnnotationAttribute:
annotationType:TestFunction
attributeName:value
attributeValue:'""'
addOnly:true
appendArray:false
Sorry for the trouble! |
If our snapshot versions aren't an option for you then we'll do another release tomorrow that should pick up this change. Hope that helps! |
I've tried the latest release 5.46.3 with this change, but the issue remains. |
There's been a bit of a delay getting the latest release out; We'll finally hope to get it out today with new versions of the plugins to follow |
In version 5.47.3 still unresolved unfortunately |
Hmm, thanks for trying newer versions. Perhaps we'd need to write a unit test for this using the sample you've provided above. Would you mind opening up a draft PR adding a new unit test based on this example? Then we can take it from there. rewrite/rewrite-java-test/src/test/java/org/openrewrite/java/AddOrUpdateAnnotationAttributeTest.java Lines 25 to 54 in 621dcfa
|
I am using
How are you running OpenRewrite?
I am using the Maven plugin, and my project is a single module project.
What is the smallest, simplest way to reproduce the problem?
What did you expect to see?
What did you see instead?
I am trying to add an attribute to each nested Annotation but no changes are being made. Updating an existing attribute does not work either.
The text was updated successfully, but these errors were encountered: