Affects PMD Version: 6.41.0
Rule: RedundantFieldInitializer
Description:
See #3684:
As @dykov pointed out, 0 + 1 - 1 is only flagged by chance. Expressions starting with 0 but not evaluating to zero (eg 0+1) would cause a false positive which should be fixed in pmd 6.
Code Sample demonstrating the issue:
class Impl {
int b = 0 + 1; // FP
}
Affects PMD Version: 6.41.0
Rule: RedundantFieldInitializer
Description:
See #3684:
Code Sample demonstrating the issue: