[java] ConstructorCallsOverridableMethod: false positive with lombok's @Value #4510
Labels
a:false-positive
PMD flags a piece of code that is not problematic
Milestone
Affects PMD Version:7.0.0-rc1
Rule: ConstructorCallsOverridableMethod
Please provide the rule name and a link to the rule documentation:
https://docs.pmd-code.org/latest/pmd_rules_java_errorprone.html#constructorcallsoverridablemethod
Description:
The first code sample uses the annotation
@Value
which can make the classFoo1
final
. So the analysis results of the two cases should be equivalent because these two cases are equivalent. However, PMD reports a warning in the first sample and no warnings in the second one because PMD ignores the annotation@Value
. PMD should not report a warning inCase1
like theCase2
.Code Sample demonstrating the issue:
Case1
Case2
Expected outcome:
PMD reports a violation at line 5 in the first case, but that's wrong. That's a false positive.
The text was updated successfully, but these errors were encountered: