-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[java] AccessorMethodGeneration: Name clash with another public field not properly handled #342
Comments
Thanks for the report. This is a known limitation. To be able to properly pinpoint which Fortunately, we are planning to work on it in the near future, we even got proposals for google summer of code to tackle this, so we can expect a proper fix over the course of the year. I'll keep this open to track the issue and let you know when a fix is ready. |
@jsotuyod much appreciated, thanks! 👍👍 |
Fixed via #2899 for PMD 7. |
Rule Set: AccessorMethodGeneration (Java - Design), PMD 5.5.5
Description:
It appears that the rule AccessorMethodGeneration fails to resolve name clash with public field in another class with identical name.
Code Sample demonstrating the issue:
Changing
ClassB#field
to e.g.ClassB#field0
removes the violation.Running PMD through: Gradle
The text was updated successfully, but these errors were encountered: