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 17:40:18 UTC 2019


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. 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).

-Alan


More information about the nio-dev mailing list