Menu

#1217 SystemPrintln always says "System.out.print is used"

PMD-5.1.2
closed
PMD
5-Trivial
Feature-Request
5.1.1
2014-08-19
2014-07-01
No

java-logging-java/SystemPrintln's message could use {0} instead of the hardcoded "System.out.print" in order to more accurately and obviously reflect the code being reported on.

public class TestPrintLn {
    public static void main(String args[]) {
        System.out.print("Print out");
        System.out.println("Print out line");
        System.err.print("Print err");
        System.err.println("Print err line");
    }
}

Says "System.out.print is used" for all four reported by the following:

pmd -d TestPrintLn.java -R java-logging-java/SystemPrintln

Discussion

  • Andreas Dangel

    Andreas Dangel - 2014-07-12

    Will be included in the next release.

     
  • Andreas Dangel

    Andreas Dangel - 2014-07-12
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-Next
    • Type: Bug --> Feature-Request
     

Log in to post a comment.