Fixed bug in SimplifyBooleanExpressions - now it catches more cases. Thanks to Paul Rowe for the report. Also fixed a problem in the RuleViolationComparator; violations on the same line of the same file resulted in one of them getting discarded since I'm using a TreeSet

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2815 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2004-07-19 17:34:37 +00:00
parent bc9af74eed
commit 8c8d0ff0aa

View File

@ -47,14 +47,6 @@ public class SimplifyBooleanExpressionsRuleTest extends SimpleAggregatorTst {
private static final String TEST4 =
"public class Foo {" + PMD.EOL +
" void bar() {" + PMD.EOL +
" if (getFoo() == false && " + PMD.EOL +
" isBar() == true) {}" + PMD.EOL +
" }" + PMD.EOL +
"}";
private static final String TEST5 =
"public class Foo {" + PMD.EOL +
" void bar() {" + PMD.EOL +
" if (getFoo() == false && isBar() == true) {}" + PMD.EOL +
" }" + PMD.EOL +
"}";