Menu

#1347 False positive for GuardLogStatementJavaUtil

PMD-5.3.2
duplicate
None
PMD
3-Major
Bug
5.3.0
2015-05-09
2015-05-06
No
if (LOG.isInfoEnabled()) {
    LOG.info("update: After spool map size: " + map.size());
  }

=> PMD error "There is log block not surrounded by if".
However, there I've just added it but it still not work !

Discussion

  • Andreas Dangel

    Andreas Dangel - 2015-05-09
    • status: open --> duplicate
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-5.3.2
     
  • Andreas Dangel

    Andreas Dangel - 2015-05-09

    Actually, it seems you are using slf4j and not java.util.logging... The rule, you are using, is explicitly for java.util.logging.
    If you are using both logging frameworks and therefore don't want to disable this rule entirely (or exclude the parts of the project, where you already use slf4j), you'll need to wait for the next PMD release.
    I consider this bug as a duplicate of [#1335].

     

    Related

    Issues: #1335


Log in to post a comment.