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 AddOrUpdateAnnotationAttribute for values of type Class #4342

Conversation

froque
Copy link
Contributor

@froque froque commented Jul 19, 2024

What's changed?

Fixes AddOrUpdateAnnotationAttribute to work with values of type Class

What's your motivation?

Fix a bug.

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

No.

Anyone you would like to review specifically?

No.

Have you considered any alternatives or workarounds?

No.

Any additional context

No.

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 self-requested a review July 19, 2024 15:02
@timtebeek timtebeek added bug Something isn't working enhancement New feature or request labels Jul 19, 2024
@timtebeek
Copy link
Contributor

Thanks a lot for this @froque ! Perhaps good to add an example where the class argument needs an import, as opposed to the java.lang imports seen now, just to be sure that's handled correctly.

@froque
Copy link
Contributor Author

froque commented Jul 19, 2024

@timtebeek I am having trouble with that. Can I delegate that to you ?

@timtebeek
Copy link
Contributor

Yes sure#

Copy link
Contributor

@github-actions github-actions bot left a 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:

  • rewrite-gradle/src/main/groovy/RewriteSettings.groovy
    • lines 31-36
  • rewrite-xml/src/main/java/org/openrewrite/xml/style/AutodetectDebug.java
    • lines 68-68
    • lines 109-111
    • lines 134-134
    • lines 147-149

Copy link
Contributor

@github-actions github-actions bot left a 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:

  • rewrite-gradle/src/main/groovy/RewriteSettings.groovy
    • lines 31-36
  • rewrite-xml/src/main/java/org/openrewrite/xml/style/AutodetectDebug.java
    • lines 68-68
    • lines 109-111
    • lines 134-134
    • lines 147-149

Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Thanks again for kicking this off @froque ! I've applied a few small adjustments to improve things still, removing cycles, and setting the correct type on the introduced class argument.

Copy link
Contributor

@github-actions github-actions bot left a 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:

  • rewrite-gradle/src/main/groovy/RewriteSettings.groovy
    • lines 31-36
  • rewrite-xml/src/main/java/org/openrewrite/xml/style/AutodetectDebug.java
    • lines 68-68
    • lines 109-111
    • lines 134-134
    • lines 147-149

Copy link
Contributor

@github-actions github-actions bot left a 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:

  • rewrite-gradle/src/main/groovy/RewriteSettings.groovy
    • lines 31-36
  • rewrite-xml/src/main/java/org/openrewrite/xml/style/AutodetectDebug.java
    • lines 68-68
    • lines 109-111
    • lines 134-134
    • lines 147-149

@timtebeek timtebeek merged commit 14aef40 into openrewrite:main Jul 25, 2024
2 checks 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 enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants