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

Create AddOrUpdateAnnotationAttributeTest.java #3981

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JohannesRabauer
Copy link

What's changed?

Tried to write a test for Issue #3978
I could not compile the project unfortunately, because of some problems with gradle. Tried the class in a different project though and it threw the expected error.

What's your motivation?

#3978

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

Fix the bug if possible. :)

Anyone you would like to review specifically?

@timtebeek suggested i create an pr for that error.

import org.openrewrite.test.RewriteTest;


class AddOrUpdateAnnotationAttributeTest implements RewriteTest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps good to instead add the test to the existing test class we already have in
rewrite-java-test/src/test/java/org/openrewrite/java/AddOrUpdateAnnotationAttributeTest.java.

@timtebeek
Copy link
Contributor

Thanks for getting this started! Having a test already helps on our way to getting this resolved for you.

Sorry to hear about your Gradle issues though; did you already go through our guide to setting up IntelliJ?
https://docs.openrewrite.org/authoring-recipes/recipe-development-environment

@timtebeek timtebeek added the enhancement New feature or request label Feb 7, 2024
@timtebeek
Copy link
Contributor

timtebeek commented Feb 19, 2024

I've since moved the test and briefly explored the options for a fix. We could maybe look at something like newAttributeValue.equals(as.getAssignment().toString()) to make changes for non-literals, but I've not yet had time to fully explore that option. Welcome to tag-team on this if you'd like to help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants