Menu

#1341 pmd:GuardDebugLogging violates LOGGER.debug with format "{}"

PMD-5.3.2
duplicate
None
PMD
4-Minor
Bug
5.1.1
2015-05-01
2015-04-28
No

Since 5.1.1 (Sonar PMD Plugin 2.2) the pmd:GuardDebugLogging violates statements like
LOGGER.debug("MessageSelector={}" , tempSelector);
which are valid as logback/slf4j does not evaluate the .toString() method.

Maybe this is fixed with https://sourceforge.net/p/pmd/bugs/1227/ ?

Related: https://sourceforge.net/p/pmd/bugs/1335/

1 Attachments

Discussion

  • Andreas Dangel

    Andreas Dangel - 2015-05-01

    This is actually fixed with PMD 5.1.2 - this problem has been reported previously as bug [#1224].

    The violation in this case doesn't make sense, as there is no string concatenating ongoing - so no guard is needed.

     

    Related

    Issues: #1224

  • Andreas Dangel

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

Log in to post a comment.

Monday.com Logo