[java] FinalFieldCouldBeStatic false positive with non-static synchronized block (regression in 6.48, worked with 6.47) #4090
Labels
a:false-positive
PMD flags a piece of code that is not problematic
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Affects PMD Version: 6.48
Rule: FinalFieldCouldBeStatic
Please provide the rule name and a link to the rule documentation: https://pmd.github.io/latest/pmd_rules_java_design.html#finalfieldcouldbestatic
Description:
6.48 flags objects that are only used for synchronization incorrectly
Code Sample demonstrating the issue:
Expected outcome: Class passes PMD checks
PMD reports a violation at line 2 ..., but that's wrong. That's a false positive.
Running PMD through: [Maven]
The text was updated successfully, but these errors were encountered: