diff --git a/pmd-java/src/main/resources/rulesets/java/unnecessary.xml b/pmd-java/src/main/resources/rulesets/java/unnecessary.xml index ab7ae2abd9..97d5e1ff09 100644 --- a/pmd-java/src/main/resources/rulesets/java/unnecessary.xml +++ b/pmd-java/src/main/resources/rulesets/java/unnecessary.xml @@ -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] ]]> diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UselessParentheses.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UselessParentheses.xml index 2a01e47b83..be24fde05d 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UselessParentheses.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/unnecessary/xml/UselessParentheses.xml @@ -240,6 +240,17 @@ public class NewClass { public void falsePositive(Boolean b) throws IOException { System.out.write(( "" + b ).getBytes()); } +} + ]]> + + + #1366 UselessParentheses false positive on multiple equality operators + 0 + diff --git a/src/site/markdown/overview/changelog.md b/src/site/markdown/overview/changelog.md index 0069565de3..26e68a2eec 100644 --- a/src/site/markdown/overview/changelog.md +++ b/src/site/markdown/overview/changelog.md @@ -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:**