Affects PMD Version:6.41.0
Rule:RedundantFieldInitializer
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_java_performance.html#redundantfieldinitializer
Description:
Hi, I found a false negative about the rule RedundantFieldInitializer.
Code Sample demonstrating the issue:
class Impl {
int a = 1 + 0 - 1; // should report a warning
int b = 0 + 1 - 1; // can be detected
}
Expected outcome:
PMD should report a violation at line 2, but doesn't. This is a false-negative.
Running PMD through: [Maven]
Affects PMD Version:6.41.0
Rule:RedundantFieldInitializer
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_java_performance.html#redundantfieldinitializer
Description:
Hi, I found a false negative about the rule RedundantFieldInitializer.
Code Sample demonstrating the issue:
Expected outcome:
PMD should report a violation at line 2, but doesn't. This is a false-negative.
Running PMD through: [Maven]