RFR: 8364007: Add overload without arguments to codePointCount in String etc. [v2]

Tatsunori Uchino duke at openjdk.org
Sat Jul 26 08:36:41 UTC 2025


On Thu, 24 Jul 2025 16:18:41 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Tatsunori Uchino has updated the pull request incrementally with four additional commits since the last revision:
>> 
>>  - Discard changes out of than java.base
>>  - Fix copyright year
>>    
>>    Co-authored-by: Mikhail Yankelevich <myankelevich at openjdk.org>
>>  - Fix how to get code point count in StringBuilder
>>    
>>    Co-authored-By: Chen Liang <liach at openjdk.org>
>>  - Fix test
>
> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 545:
> 
>> 543:         byte[] value = this.value;
>> 544:         if (isLatin1(coder)) {
>> 545:             return value.length;
> 
> Suggestion:
> 
>             return count;

I see, I fixed the argument passed to `StringUTF16.codePointCount` too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26461#discussion_r2232795947


More information about the core-libs-dev mailing list