pmd: fix #1111 False positive: Useless parentheses
This commit is contained in:
parent
829a939421
commit
dc64e2df77
@ -1,6 +1,7 @@
|
|||||||
????? ??, 2013 - 5.0.5:
|
????? ??, 2013 - 5.0.5:
|
||||||
|
|
||||||
Fixed bug 991: AvoidSynchronizedAtMethodLevel for static methods
|
Fixed bug 991: AvoidSynchronizedAtMethodLevel for static methods
|
||||||
|
Fixed bug 1111: False positive: Useless parentheses
|
||||||
Fixed bug 1114: CPD - Tokenizer not initialized with requested properties
|
Fixed bug 1114: CPD - Tokenizer not initialized with requested properties
|
||||||
Fixed bug 1118: ClassCastException in pmd.lang.ecmascript.ast.ASTElementGet
|
Fixed bug 1118: ClassCastException in pmd.lang.ecmascript.ast.ASTElementGet
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ public class Test {
|
|||||||
<property name="xpath">
|
<property name="xpath">
|
||||||
<value>
|
<value>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
//Expression/PrimaryExpression/PrimaryPrefix/Expression[count(*)=1 and count(./CastExpression)=0]
|
//Expression/PrimaryExpression/PrimaryPrefix/Expression[count(*)=1 and count(./CastExpression)=0 and count(./ConditionalExpression[@Ternary='true'])=0]
|
||||||
|
|
|
|
||||||
//Expression/ConditionalAndExpression/PrimaryExpression/PrimaryPrefix/Expression[
|
//Expression/ConditionalAndExpression/PrimaryExpression/PrimaryPrefix/Expression[
|
||||||
count(*)=1 and
|
count(*)=1 and
|
||||||
|
@ -196,4 +196,13 @@ public class Test {
|
|||||||
}
|
}
|
||||||
]]></code>
|
]]></code>
|
||||||
</test-code>
|
</test-code>
|
||||||
|
<test-code>
|
||||||
|
<description>#1111 False positive: Useless parentheses</description>
|
||||||
|
<expected-problems>0</expected-problems>
|
||||||
|
<code><![CDATA[
|
||||||
|
public class Test { public String check() {
|
||||||
|
return (absolute ? amount.abs() : amount).toString();
|
||||||
|
} }
|
||||||
|
]]></code>
|
||||||
|
</test-code>
|
||||||
</test-data>
|
</test-data>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user