You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LynnBroe
changed the title
false-positive about RedundantFieldInitializer and @Value
[java]A false positive about RedundantFieldInitializer and @Value
Apr 24, 2023
adangel
changed the title
[java]A false positive about RedundantFieldInitializer and @Value
[java] RedundantFieldInitializer: false positive with lombok's @Value
May 28, 2023
Affects PMD Version:7.0.0-rc1
Rule: RedundantFieldInitializer
Please provide the rule name and a link to the rule documentation:
https://docs.pmd-code.org/latest/pmd_rules_java_performance.html#redundantfieldinitializer
Description:
The @Value annotation can add a
final
modifier to the fieldbar
, so PMD should not report a warning at line 4.Code Sample demonstrating the issue:
Expected outcome:
PMD reports a violation at line 4, but that's wrong. That's a false positive.
Running PMD through: CLI
The text was updated successfully, but these errors were encountered: