I've got ViewState
POJO classes which have constructors with many parameters. Problem is that PMD is throwing ExcessiveParameterList
violation on them.
Now I'm trying to suppress this violation for all classes which end with ViewState.java
(e.g. in DashboardViewState.java
). I've added
this to my rules-pmd.xml
:
<rule ref="category/java/design.xml/ExcessiveParameterList">
<properties>
<!--Ignore ExcessiveParameterList on ViewState classes -->
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration['*ViewState.java']"/>
</properties>
</rule>
Problem is that this will suppress all violations against ExcessiveParameterList
no matter in which class. What am I doing wrong?