8218280: LineNumberReader throws "Mark invalid" exception if CRLF straddles buffer.
brian.burkhalter at oracle.com
Fri Apr 26 01:20:31 UTC 2019
For issue  please review the patch .
The source change merely changes mark() to use a read ahead limit one value larger than the parameter if the most recently read character is a ‘\r’ (carriage return). In this case if the next character in the stream is a ‘\n’ (line feed), the next read() would actually consume two characters instead of one. The incremented read ahead limit compensates for this.
The two sub-tests of the test both fail without the implementation change and succeed with it.
 https://bugs.openjdk.java.net/browse/JDK-8218280 <https://bugs.openjdk.java.net/browse/JDK-8218280>
More information about the core-libs-dev