RFR: 8279361: Error in documentation of third Stream.reduce method
Viktor Klang
duke at openjdk.org
Thu Sep 29 18:34:12 UTC 2022
On Thu, 29 Sep 2022 16:29:54 GMT, Paul Sandoz <psandoz at 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.
>
> The current JavaDoc is not wrong :-) (same in other places). I think what you propose may not add much clarity (given the complexities of reasoning about parallelism).
>
> We could add something after "but is not constrained to execute sequentially." e.g.
>
> "
> Parallel execution may result in intermediate results computed as if by the code above. Such results are combined using the combining function to produce the final result."
> "
@PaulSandoz That sounds like a fair solution to me, who else can chime in? :)
-------------
PR: https://git.openjdk.org/jdk/pull/10469
More information about the core-libs-dev
mailing list