Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4068994

println methods in PrintStream are specified in a Unix dependent manner

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.2.1
    • 1.1
    • 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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: