StringCharBuffer and bulk get

Brian Burkhalter brian.burkhalter at oracle.com
Wed Jul 2 18:55:48 UTC 2025


On Jul 2, 2025, at 11:19 AM, Alan Bateman <alan.bateman at oracle.com> wrote:

On 02/07/2025 16:58, Brett Okken wrote:

:

This makes it very difficult to pass a CharBuffer (where the position
is not 0) to an api taking a CharSequence - because if that api makes
a switch to start using getChars (rather than charAt), it will break.



Thanks for bringing this up. It does need attention. I just chatted with Brian Burkhalter so he's going to look through the spec + implementation changes to address this. If there is any risk or uncertainty then it mean pulling this out.

It looks like only CharBuffer.getChars is broken so the rest of the change can stay. I filed this issue to track it:

https://bugs.openjdk.org/browse/JDK-8361299

The fix is straightforward but will break a test and require a CSR.

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/nio-dev/attachments/20250702/837d3c8b/attachment.htm>


More information about the nio-dev mailing list