[java] Do not report MissingStaticMethodInNonInstantiatableClass for class with @lombok.Builder
This commit is contained in:
@ -2099,7 +2099,8 @@ $topLevelClass[
|
||||
(: no lombok produced constructors :)
|
||||
not(pmd-java:hasAnnotation('lombok.NoArgsConstructor') or
|
||||
pmd-java:hasAnnotation('lombok.RequiredArgsConstructor') or
|
||||
pmd-java:hasAnnotation('lombok.AllArgsConstructor')) and
|
||||
pmd-java:hasAnnotation('lombok.AllArgsConstructor') or
|
||||
pmd-java:hasAnnotation('lombok.Builder')) and
|
||||
(: or has non-default constructors … :)
|
||||
ClassBody/ConstructorDeclaration and
|
||||
(: … but only private … :)
|
||||
|
@ -594,7 +594,7 @@ public class Bar extends Foo {
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>#1488:[java]false-positive about MissingStaticMethodInNonInstantiatableClass and @lombok.Builder</description>
|
||||
<description>#1488:[java]false-positive about MissingStaticMethodInNonInstantiatableClass and @lombok.Builder on constructor</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
import lombok.Builder;
|
||||
@ -602,6 +602,18 @@ public class Foo {
|
||||
@Builder
|
||||
private Foo() {}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>#1488:[java]false-positive about MissingStaticMethodInNonInstantiatableClass and @lombok.Builder on class</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
import lombok.Builder;
|
||||
@Builder
|
||||
public class Foo {
|
||||
private Foo() {}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
|
Reference in New Issue
Block a user