Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235792 LineNumberReader.getLineNumber() behavior is inconsistent with respect to EOF
  3. JDK-8260874

Release Note: Line Terminator Definition Changed in java.io.LineNumberReader

    XMLWordPrintable

    Details

      Description

      The definition of line terminator has been extended to include end of stream, or one of the previously defined line terminators `'\n'`, `'\r'`, or `'\r`\`n'` followed immediately by end of stream. This changes behavior in certain cases. For example, a file containing the lines

      <pre>line 1\n
      line 2\n
      line 3</pre>

      would, before this change, have been considered to contain two lines, each terminated by '\n'. After this change, it is considered to contain three lines, the third being terminated by end of stream.

        Attachments

          Activity

            People

            Assignee:
            bpb Brian Burkhalter
            Reporter:
            bpb Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: