On Wed, 28 Sep 2022 15:36:50 GMT, Viktor Klang (Oracle) <d...@openjdk.org> 
wrote:

> This JavaDoc change attempts to shine some light on the `combiner`-function 
> as it relates to the third variant of `Stream.reduce` since it according to 
> the bug submission in JBS can be confusing that the `combiner` is not 
> mentioned in the code example in the documentation.

Note that similar code is written in other places. E.g.
java.util.stream.Stream#collect(supplier, accumulator, combiner) -- combiner is 
not mentioned


R result = supplier.get();
for (T element : this stream)
  accumulator.accept(result, element);
return result;


The same for IntStream, LongStream, and DoubleStream.collect.

In fact, I'm not sure that this worth fixing.

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

PR: https://git.openjdk.org/jdk/pull/10469

Reply via email to