Affects PMD Version:6.42.0
Rule:NullAssignment
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_java_errorprone.html#nullassignment
Description:
Hi, I found a false negative about the rule NullAssignment. PMD should have reported a warning in line 5, but it doesn't. I think this FN is caused by the parenthesis. Thanks for your consideration.
Code Sample demonstrating the issue:
public void foo() {
Object x;
x = new Object();
bar(x);
x = (null); // should report a warning in this line
}
Expected outcome:
PMD should report a violation at line 5, but doesn't. This is a false-negative.
Running PMD through: [Maven]
Affects PMD Version:6.42.0
Rule:NullAssignment
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_java_errorprone.html#nullassignment
Description:
Hi, I found a false negative about the rule NullAssignment. PMD should have reported a warning in line 5, but it doesn't. I think this FN is caused by the parenthesis. Thanks for your consideration.
Code Sample demonstrating the issue:
Expected outcome:
PMD should report a violation at line 5, but doesn't. This is a false-negative.
Running PMD through: [Maven]