8011135: (bf) CharBuffer.put(String) is slow because of String.charAt() call for each char
Brian Burkhalter
brian.burkhalter at oracle.com
Thu Feb 21 17:41:45 UTC 2019
> On Feb 21, 2019, at 9:40 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> On 21/02/2019 15:54, Brian Burkhalter wrote:
>>
>> Thanks for the comments. Should I consider this patch to have been reviewed?
>>
> The implementation looks okay but I think we should harden it so that it reads the position once, not 3 times. If someone had a bug where they changed the position currently then it might lead to IOOBE or IAE.
Good point. I’ll fix it.
> There are a few other places in the heap buffers that also need to be hardened a bit (direct buffers of course need to much more careful).
Shall I try to include fixing those in this patch?
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190221/ad9a7888/attachment-0001.html>
More information about the nio-dev
mailing list