7199551: (bf) CharBuffer.append(CharSequence) throws BufferOverflowException for read-only buffer

Alan Bateman Alan.Bateman at oracle.com
Thu Sep 20 07:27:29 PDT 2012


On 20/09/2012 14:07, Ulf Zibis wrote:
> Shouldn't the read-only check also have more priority before 
> checkBounds() ?
> If some software would invoke this method with bad bounds, it would 
> take some time, the read-only clash becomes discovered.
>
> -Ulf
I don't think there is a right answer to this. If thee are several 
possible exceptions then any of the allowed exceptions can be thrown. I 
don't want to make too many changes as it has a tendency to cause issues 
for tests, maybe some applications too.

-Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120920/4210cb3d/attachment.html 


More information about the nio-dev mailing list