RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v16]
Tatsunori Uchino
duke at openjdk.org
Sat Jan 31 12:51:43 UTC 2026
On Sat, 31 Jan 2026 08:48:09 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Tatsunori Uchino has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add `codePointCount` for `CharBuffer`
>
> src/java.base/share/classes/java/nio/X-Buffer.java.template line 2070:
>
>> 2068: int lim = limit();
>> 2069: int count = l;
>> 2070: for (int i = position(); i < lim;) {
>
> There will need a robustness pass done on this override as the CharBuffer may be backed by off-heap memory. Look at the existing overrides to see examples where it captures the limit and position once.
In the first place the logic turned out to be wrong. Could you give me more concrete comment based on the new change?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26461#discussion_r2749529891
More information about the core-libs-dev
mailing list