[15] 8235792: LineNumberReader.getLineNumber() behavior is inconsistent with respect to EOF

Roger Riggs Roger.Riggs at oracle.com
Fri Jan 31 20:05:25 UTC 2020


Hi Brian,

The spec text describing the current behavior is ok.

On 1/16/20 8:35 PM, Brian Burkhalter wrote:
> This issue [1] attempts to reinstate the change for [2] which was backed out to fix [3] thereby maintaining longstanding behavior. The proposed change [4] modifies the specification to increment the line number also when EOF is encountered and is not immediately preceded by a line terminator. If this all seems reasonable then a CSR will be filed after the code review.

LineNumberReader:

55: I would probably use 'EOL' instead of 'TERM'.

>
> One thing I am uncertain about is the change to skip() at lines 293-295 of LineNumberReader. I am not sure that those  lines should be added.
Leave them in.
Not changing prevChar would be misleading since the prevChar isn't adjecent
to the next read.

Roger

>
> Thanks,
>
> Brian
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8235792
> [2] https://bugs.openjdk.java.net/browse/JDK-8230342
> [3] https://bugs.openjdk.java.net/browse/JDK-8235668
> [4] http://cr.openjdk.java.net/~bpb/8235792/webrev.00/



More information about the core-libs-dev mailing list