Re: RFR: 4247235 (spec str) StringBuffer.insert(int, char[]) specification is inconsistent

2013-01-23 Thread Jim Gish
This time with the attachment... Thanks, Jim On 01/22/2013 02:54 PM, Jim Gish wrote: change set/patch attached for pushing. Thanks, Jim On 01/22/2013 02:40 PM, Jim Gish wrote: I've made the changes as suggested by Mike, and this has now been approved by CCC. Could someone please give

Re: RFR: 4247235 (spec str) StringBuffer.insert(int, char[]) specification is inconsistent

2013-01-22 Thread Jim Gish
I've made the changes as suggested by Mike, and this has now been approved by CCC. Could someone please give it one more look and push it for me, please? Thanks, Jim http://cr.openjdk.java.net/~jgish/Bug4247235-Add-Blanket-Null-Stmt/

Re: RFR: 4247235 (spec str) StringBuffer.insert(int, char[]) specification is inconsistent

2013-01-22 Thread Jim Gish
change set/patch attached for pushing. Thanks, Jim On 01/22/2013 02:40 PM, Jim Gish wrote: I've made the changes as suggested by Mike, and this has now been approved by CCC. Could someone please give it one more look and push it for me, please? Thanks, Jim

Re: RFR: 4247235 (spec str) StringBuffer.insert(int, char[]) specification is inconsistent

2013-01-10 Thread Stephen Colebourne
I would encourage null checking to be done first, rather than sometimes getting StringIndexOutOfBoundsException for a null input. Reasoning about the JDK methods is much easier that way around. Stephen On 9 January 2013 23:09, Mike Duigou mike.dui...@oracle.com wrote: AbstractStringBuilder

Re: RFR: 4247235 (spec str) StringBuffer.insert(int, char[]) specification is inconsistent

2013-01-10 Thread Jim Gish
Stephen, Currently here's (a sampling) of how the other methods work. Although most check indices first, not all do... (The original bug was about this very inconsistency, however one answer given to it was that in general we don't say anything about order of exceptions). However, given

Re: RFR: 4247235 (spec str) StringBuffer.insert(int, char[]) specification is inconsistent

2013-01-09 Thread Mike Duigou
AbstractStringBuilder probably needs the Unless otherwise noted, blanket statement as well (Same as StringBuffer/StringBuilder) You might want to move the Objects.requireNonNull(dst); in String.getBytes() to after the existing checks so as not to unnecessarily change the exception thrown for

Re: RFR: 4247235: (spec str) StringBuffer.insert(int, char[]) specification is inconsistent

2012-12-17 Thread Jim Gish
On 12/15/2012 08:58 AM, Alan Bateman wrote: On 14/12/2012 22:49, Jim Gish wrote: Please review http://cr.openjdk.java.net/~jgish/Bug4247235-Add-Blanket-Null-Stmt/ http://cr.openjdk.java.net/%7Ejgish/Bug4247235-Add-Blanket-Null-Stmt/ This minor spec change (which will require CCC approval),

Re: RFR: 4247235: (spec str) StringBuffer.insert(int, char[]) specification is inconsistent

2012-12-17 Thread Jim Gish
I've created a new bug: https://jbs.oracle.com/bugs/browse/JDK-8005118 - I'll address the consistency issues there, and treat the NPE specs separately. Jim On 12/17/2012 11:29 AM, Jim Gish wrote: On 12/15/2012 08:58 AM, Alan Bateman wrote: On 14/12/2012 22:49, Jim Gish wrote: Please review

Re: RFR: 4247235: (spec str) StringBuffer.insert(int, char[]) specification is inconsistent

2012-12-15 Thread Alan Bateman
On 14/12/2012 22:49, Jim Gish wrote: Please review http://cr.openjdk.java.net/~jgish/Bug4247235-Add-Blanket-Null-Stmt/ http://cr.openjdk.java.net/%7Ejgish/Bug4247235-Add-Blanket-Null-Stmt/ This minor spec change (which will require CCC approval), adds blanket null-handling statements to both