RFR: 8306623: (bf) CharBuffer::allocate throws unexpected exception type with some CharSequences [v2]

Brian Burkhalter bpb at openjdk.org
Tue Apr 25 16:50:13 UTC 2023


On Tue, 25 Apr 2023 06:27:12 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8306623: Update comment; move test code location
>
> src/java.base/share/classes/java/nio/X-Buffer.java.template line 2050:
> 
>> 2048:             //
>> 2049:             // pre-emptively check for overflow as put(int,CharBuffer,int,int)
>> 2050:             // would throw IndexOutOfBoundsException instead
> 
> The comment is confusing, I think you just want to say that the append method throws BufferOverflowException when there is insufficient space in the buffer.

Comment updated and test code moved in 118076c.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13632#discussion_r1176783538


More information about the nio-dev mailing list