-
Notifications
You must be signed in to change notification settings - Fork 74
EqualsAvoidsNull
should flip arguments for constants
#398
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
Conversation
…ethodArgs # Conflicts: # src/main/java/org/openrewrite/staticanalysis/EqualsAvoidsNullVisitor.java
src/main/java/org/openrewrite/staticanalysis/EqualsAvoidsNullVisitor.java
Outdated
Show resolved
Hide resolved
EqualsAvoidsNull
should flip arguments for constants
There was a problem hiding this 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:
- src/main/java/org/openrewrite/staticanalysis/EqualsAvoidsNullVisitor.java
- lines 18-18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the help here @punkratz312 ! Nice to see these cases covered as well.
wow so quick 🥇 well done 🍀 |
this is wrong imho |
Ah sorry to hear; in which way? What kind of changes would you propose we make now? |
Addressing references is tricky and not covered by other projects like PMD and Checkstyle. Implementing this breaks the idempotency, causing: #472 Changing a reference with another reference makes no sense to me, which is this feature kind of about. |
no PMD is making the assumption so this feature seems correct. |
Hi,
I might have found an issue in my local project where around 90 violations flagged by PMD are not being replaced correctly. Some of these violations seem related to a list and method arguments.
Could you please take over and enable the necessary tests to confirm if this is indeed an issue?
Thanks in advance!
@timtebeek
@knutwannheden
@ggerbaud