On Mon, 21 Apr 2025 15:25:34 GMT, Chen Liang <li...@openjdk.org> wrote:

>> Shaojin Wen has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   putCharsUnchecked
>
> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1773:
> 
>> 1771:             int compressed = StringUTF16.compress(s, off, val, count, 
>> end - off);
>> 1772:             count += compressed;
>> 1773:             off += compressed;
> 
> Should we update `this.count` eagerly after compression?

In the StringLatin1.canEncode(c) branch of the original code, this.count is not 
updated either, and the behavior is the same as before.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24773#discussion_r2052637495

Reply via email to