Affects PMD Version:
6.2.0
Rule:ImmutableField
, SingularField
, UnusedPrivateField
and UnusedPrivateMethod
Description:
Documentation suggests that the format is [lombok.Setter, lombok.Getter, lombok.Builder, lombok.Data, lombok.RequiredArgsConstructor, lombok.AllArgsConstructor, lombok.Value, lombok.NoArgsConstructor, java.lang.Deprecated, javafx.fxml.FXML]
. But the implementation supports only pipe-separated format without brackets at the beginning and at the end.
Code Sample demonstrating the issue:
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"> <properties> <property name="ignoredAnnotations" value="[java.lang.Deprecated, com.thoughtworks.xstream.annotations.XStreamAlias]"/> </properties> </rule>
The above config doesn't work and doesn't produce any warning about incorrect usage.
Correct configs seems to be following:
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"> <properties> <property name="ignoredAnnotations" value="java.lang.Deprecated|com.thoughtworks.xstream.annotations.XStreamAlias"/> </properties> </rule>
Running PMD through: Gradle
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4