Issue #974: PMD violation ConfusingTernary (final fix)

This commit is contained in:
Roman Ivanov 2015-10-07 07:04:06 -07:00
parent 88830ca708
commit 9ff4d78be8
1 changed files with 6 additions and 2 deletions

View File

@ -130,8 +130,6 @@
</rule>
<rule ref="rulesets/java/design.xml">
<!-- till #974-->
<exclude name="ConfusingTernary"/>
<!-- extra final modifier does not make code more secure in that cases-->
<exclude name="ImmutableField"/>
<!-- this rule does not have any option, unreasonable to use -->
@ -146,6 +144,12 @@
<exclude name="GodClass"/>
</rule>
<rule ref="rulesets/java/design.xml/ConfusingTernary">
<properties>
<!-- false positives on IF_ELSE-IF-ELSE-IF -->
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[@Image='XMLLogger']//MethodDeclarator[@Image='isReference'] | //ClassOrInterfaceDeclaration[@Image='DetailAST']//MethodDeclarator[@Image='addPreviousSibling'] | //ClassOrInterfaceDeclaration[@Image='AnnotationLocationCheck']//MethodDeclarator[@Image='checkAnnotations'] | //ClassOrInterfaceDeclaration[@Image='PkgControl']//MethodDeclarator[@Image='checkAccess'] | //ClassOrInterfaceDeclaration[@Image='HandlerFactory']//MethodDeclarator[@Image='getHandler']"/>
</properties>
</rule>
<rule ref="rulesets/java/design.xml/EmptyMethodInAbstractClassShouldBeAbstract">
<properties>
<!-- Can not change API -->