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

[java] UseUtilityClassRule reports false positive with lombok NoArgsConstructor #968

Closed
clem0110 opened this issue Mar 10, 2018 · 1 comment
Labels
a:false-positive PMD flags a piece of code that is not problematic
Milestone

Comments

@clem0110
Copy link
Contributor

Please, prefix the report title with the language it applies to within brackets, such as [java] or [apex].
If not specific to a language, you can use [core].

Affects PMD Version: 6.0.0

Rule: UseUtilityClassRule

Description: If you setup a utility factory class using lombok to create the private no arg constructor, a false positive is created that the constructor should be added.

Code Sample demonstrating the issue:

import lombok.NoArgsConstructor;
import lombok.AccessLevel;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class Foo {
 public static Foo get() {
  return null;
 }
}

Running PMD through: [Maven]

@clem0110
Copy link
Contributor Author

See #969 for fix

@jsotuyod jsotuyod added the a:false-positive PMD flags a piece of code that is not problematic label Mar 10, 2018
@jsotuyod jsotuyod added this to the 6.2.0 milestone Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:false-positive PMD flags a piece of code that is not problematic
Projects
None yet
Development

No branches or pull requests

2 participants