On Thu, 29 Sep 2022 06:55:30 GMT, Tagir F. Valeev <tval...@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. @amaembo Thanks for the input! If the changed wording in this PR is accepted, it will be straight-forward for me to apply the same treatment to the other methods. At least that was my thinking. :) ------------- PR: https://git.openjdk.org/jdk/pull/10469