On Sun, 1 Feb 2026 12:55:29 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 two 
> additional commits since the last revision:
> 
>  - Add comment
>  - Fix logic error

I don't know how to fix the offending "tools/javac/patterns/Exhaustiveness" 
error.

https://github.com/tats-u/jdk/actions/runs/21563196651#summary-62131220808

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26461#issuecomment-3831173111

Reply via email to