Affects PMD Version:6.47.0
Rule:SimplifiableTestAssertion
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/pmd-6.47.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion
Description:
Hi, I found a false negative about the rule SimplifiableTestAssertion, please read the following code example. In line 6, PMD should have reported a warning because this line can be simplified into assertEquals(a, b);, but it doesn't. Hence, I think this is a false negative. Thanks.
Code Sample demonstrating the issue:
public class A {
class B {
Object a, b;
@Test
public void test() {
assertTrue(a.equals(b)); // should report a warning in this line
}
}
}
Expected outcome:
PMD should report a violation at line 6, but doesn't. This is a false-negative.
Running PMD through: [Maven]
Affects PMD Version:6.47.0
Rule:SimplifiableTestAssertion
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/pmd-6.47.0/pmd_rules_java_bestpractices.html#simplifiabletestassertion
Description:
Hi, I found a false negative about the rule SimplifiableTestAssertion, please read the following code example. In line 6, PMD should have reported a warning because this line can be simplified into
assertEquals(a, b);, but it doesn't. Hence, I think this is a false negative. Thanks.Code Sample demonstrating the issue:
Expected outcome:
PMD should report a violation at line 6, but doesn't. This is a false-negative.
Running PMD through: [Maven]