RFR: 8372946 - TreeMap sub-map entry spliterator is expensive [v4]

Oli Gillespie ogillespie at openjdk.org
Thu Feb 26 10:55:49 UTC 2026


On Mon, 23 Feb 2026 16:42:46 GMT, Oli Gillespie <ogillespie at openjdk.org> wrote:

>> Alternatively we can override `stream()` to call the `StreamSupport.stream` that takes a `Supplier<? extends Spliterator<T>>` instead.
>
> Good point, in fact I think that's more correct. From stream():
> 
>> This method should be overridden when the spliterator() method cannot return a spliterator that is IMMUTABLE, CONCURRENT, or late-binding. (See spliterator() for details.)
> 
> I suppose ours is no longer late-binding.

Fixed, please take a look when you can.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28608#discussion_r2858321395


More information about the core-libs-dev mailing list