RFR: 4247235: (spec str) StringBuffer.insert(int, char[]) specification is inconsistent
Alan Bateman
Alan.Bateman at oracle.com
Sat Dec 15 13:58:23 UTC 2012
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 StringBuffer and StringBuilder,
> equivalent to the one already in String.
It looks like most (all?) of the methods defined by StringBuffer and
StringBuilder that can throw NPE already specify it. Are you planning on
removing the @throws from the methods?
I see that String uses <tt>null</tt>, the proposed update to
StringBuilder uses <code>null</code>, and the proposed update to
StringBuffer uses {@code null}. We should try to be consistent.
-Alan.
More information about the core-libs-dev
mailing list