Re: RFR: JDK-8200380 String::lines

2018-05-22 Thread Paul Sandoz
+1 Paul. > On May 22, 2018, at 5:47 AM, Jim Laskey wrote: > > Revised webrev: > http://cr.openjdk.java.net/~jlaskey/8200380/webrev.02/index.html > > > Added UTF-16 cases to test > private final

Re: RFR: JDK-8200380 String::lines

2018-05-22 Thread Roger Riggs
Looks good,  Thanks Jim On 5/22/2018 8:47 AM, Jim Laskey wrote: Revised webrev: http://cr.openjdk.java.net/~jlaskey/8200380/webrev.02/index.html Added UTF-16 cases to test private final LinesSpliterator classes Removed cs

Re: RFR: JDK-8200380 String::lines

2018-05-22 Thread Jim Laskey
Revised webrev: http://cr.openjdk.java.net/~jlaskey/8200380/webrev.02/index.html Added UTF-16 cases to test private final LinesSpliterator classes Removed cs field from LinesSpliterator classes > On May 18, 2018, at 10:44 AM,

Re: RFR: JDK-8200380 String::lines

2018-05-18 Thread Jim Laskey
Made the change to 1) already (based on Paul’s remarks) 2) skipLineSeparator needs to handle the end of string with no terminator case (start == fence.) Could change it but then would have to change other code around. > On May 18, 2018, at 3:33 PM, Xueming Shen

Re: RFR: JDK-8200380 String::lines

2018-05-18 Thread Xueming Shen
On 5/18/18, 6:44 AM, Jim Laskey wrote: String::lines instance method that returns a Stream with elements composed of substrings from the original string delimited by any recognized new line character sequence. webrev:

Re: RFR: JDK-8200380 String::lines

2018-05-18 Thread Paul Sandoz
> On May 18, 2018, at 10:57 AM, Jim Laskey wrote: > > Guilty of just cloning the CharacterSpliterator. > :-) I have done my fair share of spliterator cloning. > Sundar recommended "full on" private final. How about just having the > characteristics constant in the

Re: RFR: JDK-8200380 String::lines

2018-05-18 Thread Jim Laskey
Guilty of just cloning the CharacterSpliterator. Sundar recommended "full on" private final. How about just having the characteristics constant in the characteristics() method and dropping the cs args and fields altogether? — Jim > On May 18, 2018, at 2:47 PM, Paul Sandoz

Re: RFR: JDK-8200380 String::lines

2018-05-18 Thread Paul Sandoz
Hi Jim, The Spliterators could be marginally improved: - the package private constructor need not declare a cs argument, and can pass in the characteristics to the other constructor. - the other constructor can be made private (i use this pattern just to signal that it is used internally) and

Re: RFR: JDK-8200380 String::lines

2018-05-18 Thread Jim Laskey
D’oh - thanks for reminding me. I had it in the back of my mind but failed to follow through. Cheers, — Jim > On May 18, 2018, at 11:39 AM, Roger Riggs wrote: > > Hi Jim, > > Can you add some test cases for the UTF-16. I think all the cases fall into > the Latin1

Re: RFR: JDK-8200380 String::lines

2018-05-18 Thread Roger Riggs
Hi Jim, Can you add some test cases for the UTF-16.  I think all the cases fall into the Latin1 encoding. The rest looks fine. Roger On 5/18/18 10:31 AM, Sundararajan Athijegannathan wrote: +1 I think LinesSpliterator classes in StringLatin1 and StringUTF8 could be "private" and "final".

Re: RFR: JDK-8200380 String::lines

2018-05-18 Thread Sundararajan Athijegannathan
+1 I think LinesSpliterator classes in StringLatin1 and StringUTF8 could be "private" and "final". -Sundar On 18/05/18, 7:14 PM, Jim Laskey wrote: String::lines instance method that returns a Stream with elements composed of substrings from the original string delimited by any recognized

RFR: JDK-8200380 String::lines

2018-05-18 Thread Jim Laskey
String::lines instance method that returns a Stream with elements composed of substrings from the original string delimited by any recognized new line character sequence. webrev: http://cr.openjdk.java.net/~jlaskey/8200380/webrev/index.html