On Mon, 10 Aug 2026 08:51:47 GMT, Volkan Yazici <[email protected]> wrote:
>> Liam Miller-Cushon has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Review feedback
>
> src/java.base/share/classes/java/lang/String.java line 1672:
>
>> 1670: }
>> 1671: }
>> 1672: return false;
>
> Can we simplify this as follows?
>
> while (sp < sl) {
> char c = StringUTF16.getChar(val, sp++);
> if (Character.isSurrogate(c)) {
> if (!Character.isHighSurrogate(c) || sp == sl ||
> !Character.isLowSurrogate(StringUTF16.getChar(val, sp))) {
> return true;
> }
> sp++;
> }
> }
> return false;
Yes, thanks! Done
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32268#discussion_r3757156832