println methods in PrintStream are specified in a Unix dependent manner

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.2.1
    • Affects Version/s: 1.1
    • Component/s: specification
    • None
    • 1.2.1
    • generic
    • generic

      The println methods of java.io.PrintStream (JLS 22.22.17 - 22.22.26) specify that they print \n after printing their argument (or just \n, in 22.22.17). This relies on the interpretation that the newline character \n will indeed produce the desired effect - going to the beginning of a new line. This is the case in Unix, but not in , e.g., Windows. Indeed, the Windows implementation does not conform to the spec, and writes an explicit carriage return (\r) prior to the newline.

      The spec should give a system independent characterization of the behavior of these functions.


      gilad.bracha@eng 1997-07-31

            Assignee:
            Michael Mccloskey (Inactive)
            Reporter:
            Gilad Bracha (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: