On Fri, 21 Aug 2026 00:19:37 GMT, Stuart Marks <[email protected]> wrote:
>> Tatsunori Uchino has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Change "isolated surrogate code unit" to "unpaired surrogate"
>
> test/jdk/java/lang/String/Supplementary.java line 426:
>
>> 424: int expected = Character.codePointCount(str, 0,
>> str.length());
>> 425: check(result != expected, "substring:codePointCount()",
>> result, expected);
>> 426:
>
> I would move these new lines up toward the top of this method since it's an
> obvious case that seems like it ought to be checked first. Before the first
> for-loop is a good place. The `length` local variable can also be used
> instead of `str.length()` and its meaning is clear since the local variable
> initialization will be immediately above.
You will have to enclose them with a block to allow `for` to declare variables
with the same names:
static void test8() {
{
// these 3 lines
}
for (/* ... */) {
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26461#discussion_r3943608609