diff --git a/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTestRunner.java b/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTestRunner.java index 7e1e5606db..25b8d04641 100644 --- a/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTestRunner.java +++ b/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTestRunner.java @@ -72,7 +72,7 @@ public class RuleTestRunner extends ParentRunner { RuleTestDescriptor focused = ruleTests.getFocusedTestOrNull(); for (RuleTestDescriptor t : ruleTests.getTests()) { TestDescriptor td = new TestDescriptor(t); - if (focused != null && focused != t) { + if (focused != null && !focused.equals(t)) { td.setRegressionTest(false); // disable it } tests.add(td);