On Thu, 8 May 2025 16:08:24 GMT, Stuart Marks <[email protected]> wrote:
>> This PR proposes to address comments in the initial PR for Stable Values,
>> which were deferred until after integration.
>>
>> Unfortunately, this PR shows the total commit history for stable values.
>
> src/java.base/share/classes/java/util/ImmutableCollections.java line 954:
>
>> 952: return deepRoot(sub.root);
>> 953: }
>> 954: throw new InternalError("Should not reach here: " +
>> list.getClass().getName());
>
> Does this need to be recursive? There is logic to avoid nesting of sublists,
> and a sublist of a reversed view should end up being a reversed view of a
> sublist, so the most deep nesting that can occur is reversed(sublist(base)).
Actually, this introduces a bug. If there is a reversed(sublist(base)) op, then
the sublist is disregarded. So we need to remove this.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25004#discussion_r2081303938