On Mon, 26 Jan 2026 23:44:34 GMT, Tatsunori Uchino <[email protected]> wrote:
>> Adds `codePointCount()` overloads to `String`, `Character`,
>> `(Abstract)StringBuilder`, and `StringBuffer` to make it possible to
>> conveniently retrieve the length of a string as code points without extra
>> boundary checks.
>>
>>
>> if (superTremendouslyLongExpressionYieldingAString().codePointCount() >
>> limit) {
>> throw new Exception("exceeding length");
>> }
>>
>>
>> Is a CSR required to this change?
>
> Tatsunori Uchino has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Improve JavaDoc
>
> Co-authored-by: Chen Liang <[email protected]>
src/java.base/share/classes/java/lang/Character.java line 10004:
> 10002: /**
> 10003: * {@return the number of Unicode code points in the {@code char}
> array}
> 10004: * Unpaired surrogates count as one code point each.
It'd be better to replace "surrogates" with "surrogate code units." Applies to
other method descriptions too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26461#discussion_r2729719433