Re: 8218280: LineNumberReader throws "Mark invalid" exception if CRLF straddles buffer.

2019-04-26 Thread Brian Burkhalter
Hi Daniel, I actually caught that already: the diff I included before was stale (from a scroll-up in the terminal!). Thanks! Brian > On Apr 26, 2019, at 11:45 AM, Daniel Fuchs wrote: > > Looks good Brian! > > nit: > > > +reader.reset(); // reset to position after '\n' > > actu

Re: 8218280: LineNumberReader throws "Mark invalid" exception if CRLF straddles buffer.

2019-04-26 Thread Daniel Fuchs
Looks good Brian! nit: > +reader.reset(); // reset to position after '\n' actually it's 'after '\r'' now. No need for new review! best regards, -- daniel On 26/04/19 19:27, Brian Burkhalter wrote: Daniel, I modified the test as shown below. It passes both before and after the

Re: 8218280: LineNumberReader throws "Mark invalid" exception if CRLF straddles buffer.

2019-04-26 Thread Brian Burkhalter
Daniel, I modified the test as shown below. It passes both before and after the implementation change. Thanks, Brian --- a/test/jdk/java/io/LineNumberReader/MarkSplitCRLF.java +++ b/test/jdk/java/io/LineNumberReader/MarkSplitCRLF.java @@ -56,6 +56,24 @@ } @Test +public static v

Re: 8218280: LineNumberReader throws "Mark invalid" exception if CRLF straddles buffer.

2019-04-26 Thread Pavel Rappo
> On 26 Apr 2019, at 02:20, Brian Burkhalter > wrote: > > For issue [1] please review the patch [2]. Looks good to me.

Re: 8218280: LineNumberReader throws "Mark invalid" exception if CRLF straddles buffer.

2019-04-26 Thread Daniel Fuchs
Hi Brian, I believe this looks good. I had to convince myself that there was no issue when '\r' is not followed by '\n' but I couldn't fault the logic. I wonder if adding a third test case with '\r' not followed by '\n' would be a good idea? best regards, -- daniel On 26/04/2019 02:20, Brian

8218280: LineNumberReader throws "Mark invalid" exception if CRLF straddles buffer.

2019-04-25 Thread Brian Burkhalter
For issue [1] please review the patch [2]. 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