forked from phoedos/pmd
#1366 UselessParentheses false positive on multiple equality operators
This commit is contained in:
@ -253,7 +253,8 @@ public class Test {
|
||||
count(./InclusiveOrExpression)=0 and
|
||||
count(./ExclusiveOrExpression)=0 and
|
||||
count(./ConditionalAndExpression)=0 and
|
||||
count(./ConditionalOrExpression)=0]
|
||||
count(./ConditionalOrExpression)=0 and
|
||||
count(./EqualityExpression)=0]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
|
@ -240,6 +240,17 @@ public class NewClass {
|
||||
public void falsePositive(Boolean b) throws IOException {
|
||||
System.out.write(( "" + b ).getBytes());
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<description>#1366 UselessParentheses false positive on multiple equality operators</description>
|
||||
<expected-problems>0</expected-problems>
|
||||
<code><![CDATA[
|
||||
public class Useless {
|
||||
public boolean test(Object a, Object b) {
|
||||
return (a == null) == (b == null);
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
@ -14,5 +14,6 @@
|
||||
|
||||
* [#1364](https://sourceforge.net/p/pmd/bugs/1364/): FieldDeclarationsShouldBeAtStartOfClass false positive using multiple annotations
|
||||
* [#1365](https://sourceforge.net/p/pmd/bugs/1365/): Aggregated javadoc report is missing
|
||||
* [#1366](https://sourceforge.net/p/pmd/bugs/1366/): UselessParentheses false positive on multiple equality operators
|
||||
|
||||
**API Changes:**
|
||||
|
Reference in New Issue
Block a user