On Mon, 23 Feb 2026 15:32:25 GMT, Chen Liang <[email protected]> wrote:

>> Yes, seems you cannot create a spliterator with a lazy iterator. This is 
>> fine.
>
> 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.

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

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

Reply via email to