Issue #974: PMD violation ConfusingTernary (final fix)
This commit is contained in:
parent
88830ca708
commit
9ff4d78be8
|
|
@ -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 -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue