GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [java] GuardLogStatement: False positive when guard is not a direct parent · Issue #4282 · pmd/pmd Closed Labels a:false-positivePMD flags a piece of code that is not problematic Milestone DescriptionAffects PMD Version: Rule: GuardLogStatement Description: I have an additional Code Sample demonstrating the issue: import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; public class Foo { private static final Logger LOG = LogManager.getLogger(Foo.class); public void test(String arg1) { if (LOG.isWarnEnabled()) { if (someCondition) { String msg = "Message 1 with one argument: "; LOG.warn(msg + arg1); } else { String msg = "Message 2 with two arguments: {}, {}."; LOG.warn(msg + arg1); } } } } Expected outcome: PMD should look further around it to detect a guard method. Running PMD through: Maven | Eclipse Plug-in Activity
MetadataMetadataAssigneesLabelsa:false-positivePMD flags a piece of code that is not problematic TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |