8011135: (bf) CharBuffer.put(String) is slow because of String.charAt() call for each char
Alan Bateman
Alan.Bateman at oracle.com
Thu Feb 21 13:12:03 UTC 2019
On 21/02/2019 10:31, Claes Redestad wrote:
> Hi Brian,
>
> patch looks good to me, but the new implementation will throw
> BufferOverflowException before writing anything to the buffer, whereas
> the old one would fill up the CharBuffer.
Which case (CharBuffer sub-class) do you see this? The CharBuffer
put(String, ...) methods are specified to throw BufferOverflowException
and the implementation should be throwing this before copying any chars
into the buffer.
-Alan
More information about the nio-dev
mailing list