On Tue, 11 Mar 2025 07:48:40 GMT, Per Minborg <pminb...@openjdk.org> wrote:

>> src/java.base/share/classes/java/util/ImmutableCollections.java line 772:
>> 
>>> 770: 
>>> 771:     @jdk.internal.ValueBased
>>> 772:     static final class StableList<E> extends AbstractImmutableList<E> {
>> 
>> Is there significant reuse gained by putting StableList in 
>> ImmutableCollection? The back-and-forth between here and SV through 
>> SharedSecrets is a little awkward.
>
> This allows reuse of `AbstractImmutableList` with list iterators, sub lists 
> and more.

Using the regular AbstractList as a base would also get you implementations of 
those.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r1989875430

Reply via email to