Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-21 Thread Claes Redestad
On 2020-05-21 12:35, Alan Bateman wrote: On 20/05/2020 16:21, Claes Redestad wrote: Ok - I'll also update and resubmit the CSR with the edits and additions that came up during review here. For the test then you could expand it to test the views of heap and direct buffers (asCharBuffer).

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-21 Thread Alan Bateman
On 20/05/2020 16:21, Claes Redestad wrote: Ok - I'll also update and resubmit the CSR with the edits and additions that came up during review here. For the test then you could expand it to test the views of heap and direct buffers (asCharBuffer). How about this: http://cr.openjdk.java.net/~

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-20 Thread Claes Redestad
On 2020-05-20 16:10, Alan Bateman wrote: On 19/05/2020 20:35, Claes Redestad wrote: Hi Jason, I guess overriding and marking the CharBuffer method final for consistency wouldn't hurt. Except I probably need to pass this through another CSR review. Also added test cases for char[] and Stri

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-20 Thread Alan Bateman
On 19/05/2020 20:35, Claes Redestad wrote: Hi Jason, I guess overriding and marking the CharBuffer method final for consistency wouldn't hurt. Except I probably need to pass this through another CSR review. Also added test cases for char[] and String-based CharBuffers: http://cr.openjdk.jav

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-19 Thread Claes Redestad
s are concerned. Jason From: core-libs-dev on behalf of Claes Redestad Sent: Tuesday, May 19, 2020 5:37 AM To: Roger Riggs; core-libs-dev@openjdk.java.net Subject: Re: RFR: 8215401: Add isEmpty default method to CharSequence Hi Roger, sure, added Emptiness.java

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-19 Thread Jason Mehrens
From: core-libs-dev on behalf of Claes Redestad Sent: Tuesday, May 19, 2020 5:37 AM To: Roger Riggs; core-libs-dev@openjdk.java.net Subject: Re: RFR: 8215401: Add isEmpty default method to CharSequence Hi Roger, sure, added Emptiness.java with a few sanity tests. /Claes On 2020

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-19 Thread Roger Riggs
Hi Claes, Looks good, Thanks for the test. p.s.  I probably would have used a data provider for the CS cases but its not significant. On 5/19/20 6:37 AM, Claes Redestad wrote: Hi Roger, sure, added Emptiness.java with a few sanity tests. /Claes On 2020-05-19 00:29, Roger Riggs wrote: Hi

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-19 Thread Claes Redestad
Hi Roger, sure, added Emptiness.java with a few sanity tests. /Claes On 2020-05-19 00:29, Roger Riggs wrote: Hi Claes, Though it does not look like it could be any simpler, there should probably be a test. Checking consistency with the existing implementations of CharSequence.length() and

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-19 Thread Claes Redestad
Good eye - I believe I intended this to be a {@code} block. Updated in- place. /Claes On 2020-05-19 02:31, Jonathan Gibbons wrote: You might want to check the /generated/ API docs. It doesn't look like the first {@link} will do what you might be expecting. -- Jon On 5/18/20 1:48 PM, Claes Re

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-18 Thread Jonathan Gibbons
You might want to check the /generated/ API docs. It doesn't look like the first {@link} will do what you might be expecting. -- Jon On 5/18/20 1:48 PM, Claes Redestad wrote: Hi, let's add an isEmpty default method to CharSequence! Webrev: http://cr.openjdk.java.net/~redestad/8215401/open.00

Re: RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-18 Thread Roger Riggs
Hi Claes, Though it does not look like it could be any simpler, there should probably be a test. Checking consistency with the existing implementations of CharSequence.length() and a custom subtype. Thanks, Roger On 5/18/20 4:48 PM, Claes Redestad wrote: Hi, let's add an isEmpty default m

RFR: 8215401: Add isEmpty default method to CharSequence

2020-05-18 Thread Claes Redestad
Hi, let's add an isEmpty default method to CharSequence! Webrev: http://cr.openjdk.java.net/~redestad/8215401/open.00/ RFE:https://bugs.openjdk.java.net/browse/JDK-8215401 CSR:https://bugs.openjdk.java.net/browse/JDK-8215402 Testing: tier1-3 /Claes