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

Ulf Zibis Ulf.Zibis at CoSoCo.de
Thu Sep 20 11:17:30 PDT 2012


Am 20.09.2012 16:27, schrieb Alan Bateman:
> 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.

No problem, was just an additional thought.

Maybe it would be a good style, to list the exceptions in javadoc in the order of their priority. 8-)

-Ulf

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


More information about the nio-dev mailing list