From c1b8d6a5d83d5b8f95a9242030ada988b932ab64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Fri, 22 Jul 2022 17:30:54 +0200 Subject: [PATCH] Fix PMD warning --- .../java/net/sourceforge/pmd/testframework/RuleTestRunner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);