RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

Rémi Forax forax at openjdk.org
Wed Nov 8 17:29:05 UTC 2023


On Sun, 5 Nov 2023 16:18:52 GMT, Tagir F. Valeev <tvaleev at openjdk.org> wrote:

>> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461)
>
> src/java.base/share/classes/java/util/stream/Gatherer.java line 330:
> 
>> 328:     static <T, R> Gatherer<T, Void, R> ofSequential(
>> 329:             Integrator<Void, T, R> integrator,
>> 330:             BiConsumer<Void, Downstream<? super R>> finisher) {
> 
> Probably, accepting `Consumer<Downstream<? super R>>` and adapting it would be more user-friendly?

In that case the integrator should be a BiConsumer too, no ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1386961034


More information about the core-libs-dev mailing list