pmd: fix #1102 False positive: shift operator parenthesis
This commit is contained in:
parent
cc095674b0
commit
91f2137679
@ -4,6 +4,7 @@ Fixed bug 991: AvoidSynchronizedAtMethodLevel for static methods
|
||||
Fixed bug 1084: NPE at UselessStringValueOfRule.java:36
|
||||
Fixed bug 1092: Wrong Attribute "excludemarker" in Ant Task Documentation
|
||||
Fixed bug 1099: UseArraysAsList false positives
|
||||
Fixed bug 1102: False positive: shift operator parenthesis
|
||||
Fixed bug 1104: IdempotentOperation false positive
|
||||
Fixed bug 1107: PMD 5.0.4 couldn't parse call of parent outer java class method from inner class
|
||||
Fixed bug 1111: False positive: Useless parentheses
|
||||
|
@ -241,7 +241,8 @@ public class Test {
|
||||
//Expression/AdditiveExpression[not(./PrimaryExpression/PrimaryPrefix/Literal[@StringLiteral = 'true'])]/PrimaryExpression/PrimaryPrefix/Expression[
|
||||
count(*)=1 and
|
||||
not(./CastExpression) and
|
||||
not(./ConditionalExpression)]
|
||||
not(./ConditionalExpression) and
|
||||
not(./ShiftExpression)]
|
||||
|
|
||||
//Expression/EqualityExpression/PrimaryExpression/PrimaryPrefix/Expression[
|
||||
count(*)=1 and
|
||||
|
@ -205,4 +205,15 @@ return (absolute ? amount.abs() : amount).toString();
|
||||
} }
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description>#1102 False positive: shift operator parenthesis</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class Test {
|
||||
public void foo() {
|
||||
xCoord = e.getX() - (MainFrame.TILESIZE >> 1);
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
</test-data>
|
||||
|
Loading…
x
Reference in New Issue
Block a user