False positive for GuardLogStatementJavaUtil with Log4j
A source code analyzer
Brought to you by:
adangel,
juansotuyo
PMD detects a false positive GuardLogStatementJavaUtil with the code below :
<test-code> <description>False positive for GuardLogStatementJavaUtil with Log4j</description> <expected-problems>0</expected-problems> <code><![CDATA[ import org.apache.log4j.Logger; public class GuardLogTest { Logger LOG; public void foo() { if (LOG.isInfoEnabled()) { LOG.info("update: After spool map size: " + map.size()); } } } ]]></code> </test-code>
Thanks,
This will be fixed with PMD 5.3.4.
Commit: https://github.com/pmd/pmd/commit/100dd09b28931f57597355fb2cd5349bcbe10ab7
Diff: