-
-
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] Fix #4225 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's @NoArgsConstructor annotation #4227
Conversation
Generated by 🚫 Danger |
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 PR!
Can you please also create test cases for the other two lombok annotations which generate constructors?
@RequiredArgsConstructor
@AllArgsConstructor
See https://projectlombok.org/features/constructor for the full lombok documentation.
Ok, Iwill create some test cases for the other two lombok annotations |
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!
private Test(int a, int b, int c, String abc, long d, double p, | ||
String[] arr, int data, long in, float fl, String res) { } // 11 params |
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.
I'll change these test samples myself when I merge it, because the sample classes should have fields and not constructors. The constructors are generated by lombok, so no need to define them. But the generated constructors would depend on the fields (at least for allargs and required args). That way, the examples are more "realistic".
[java] Fix pmd#4225 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's @NoArgsConstructor annotation pmd#4227
Describe the PR
This PR excludes lombok's @NoArgsConstructor annotation which generates a public constructor but PMD treats it as a false positive.
Related issues
Ready?
./mvnw clean verify
passes (checked automatically by github actions)