GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — [java] Fix #4225 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's @NoArgsConstructor annotation by LynnBroe · Pull Request #4227 · pmd/pmd Conversation
Contributor
Describe the PRThis PR excludes lombok's @NoArgsConstructor annotation which generates a public constructor but PMD treats it as a false positive. Related issues
Ready?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
Generated by 🚫 Danger |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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@AllArgsConstructorSee https://projectlombok.org/features/constructor for the full lombok documentation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ok, Iwill create some test cases for the other two lombok annotations |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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 an error while loading. Please reload this page.
There was a problem 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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
[java] Fix pmd#4225 MissingStaticMethodInNonInstantiatableClass: Exclude lombok's @NoArgsConstructor annotation pmd#4227
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[java] MissingStaticMethodInNonInstantiatableClass should consider Lombok's @NoArgsConstructor
There was an error while loading. Please reload this page.