JDK-8260874 : Release Note: Line Terminator Definition Changed in java.io.LineNumberReader
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 16
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2021-02-02
  • Updated: 2021-12-06
  • Resolved: 2021-12-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16Resolved
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.
Comments
Text change to see if the \ can be rendered. Changing the middle "\" to the character code (&#92;) for "\" caused it to render in the generated page. I'll leave the change for now but if you find a less klugey way to get it to show up please make the change. I'll make sure the html in the RN page is correct regardless.
03-02-2021