[java] GuardLogStatement reports violation for Log4j parameterized logs #4703
Labels
a:false-positive
PMD flags a piece of code that is not problematic
Milestone
Affects PMD Version: 6.53.0, 6.55.0
Rule: GuardLogStatement
Description:
PMD reports a violation when Log4j parameterized logs are used. We are in the process of converting all logs from concatenated strings to parameterized logs, using PMD to find offending logs. But PMD reports the same logs even after updating.
Code Sample demonstrating the issue:
Expected outcome:
PMD reports a violation at lines 8 and 10, but that's wrong. That's a false positive.
Running PMD through: Maven
P.S. I saw someone else report the same false-positive on another issue - #3144 (comment)
The text was updated successfully, but these errors were encountered: