Re: specification for null handling in String, StringBuilder, etc.

2012-06-12 Thread RĂ©mi Forax
On 06/12/2012 07:40 AM, David Holmes wrote: Hi Jim, On 12/06/2012 7:59 AM, Jim Gish wrote: While triaging outstanding String bugs, I was looking at 4247235, (spec str) StringBuffer.insert(int, char[]) specification is inconsistent Although the description is out of date w.r.t. the current

Re: specification for null handling in String, StringBuilder, etc.

2012-06-12 Thread Stephen Colebourne
On 06/12/2012 07:40 AM, David Holmes wrote: On 12/06/2012 7:59 AM, Jim Gish wrote: My personal feeling is that pre-conditions should be explicitly checked for and be spec'd. This is very, very common in the core libraries. Rather than document every single method where a null parameter

Re: specification for null handling in String, StringBuilder, etc.

2012-06-12 Thread Alan Bateman
On 12/06/2012 06:40, David Holmes wrote: This is very, very common in the core libraries. Rather than document every single method where a null parameter triggers NPE they are often covered (directly or indirectly) by blanket statements of the form unless otherwise stated Right, @throws

Re: specification for null handling in String, StringBuilder, etc.

2012-06-12 Thread David Schlosnagle
On Tue, Jun 12, 2012 at 9:04 AM, Alan Bateman alan.bate...@oracle.com wrote: On 12/06/2012 06:40, David Holmes wrote: This is very, very common in the core libraries. Rather than document every single method where a null parameter triggers NPE they are often covered (directly or indirectly)

Re: specification for null handling in String, StringBuilder, etc.

2012-06-12 Thread Jim Gish
On 06/12/2012 01:40 AM, David Holmes wrote: Hi Jim, On 12/06/2012 7:59 AM, Jim Gish wrote: While triaging outstanding String bugs, I was looking at 4247235, (spec str) StringBuffer.insert(int, char[]) specification is inconsistent Although the description is out of date w.r.t. the current

Re: specification for null handling in String, StringBuilder, etc.

2012-06-12 Thread Joe Darcy
On 6/12/2012 6:04 AM, Alan Bateman wrote: On 12/06/2012 06:40, David Holmes wrote: This is very, very common in the core libraries. Rather than document every single method where a null parameter triggers NPE they are often covered (directly or indirectly) by blanket statements of the form

specification for null handling in String, StringBuilder, etc.

2012-06-11 Thread Jim Gish
While triaging outstanding String bugs, I was looking at 4247235, (spec str) StringBuffer.insert(int, char[]) specification is inconsistent Although the description is out of date w.r.t. the current code, I did find what I would consider weaknesses (maybe even holes) in the specs relative to

Re: specification for null handling in String, StringBuilder, etc.

2012-06-11 Thread David Holmes
Hi Jim, On 12/06/2012 7:59 AM, Jim Gish wrote: While triaging outstanding String bugs, I was looking at 4247235, (spec str) StringBuffer.insert(int, char[]) specification is inconsistent Although the description is out of date w.r.t. the current code, I did find what I would consider