JDK-8042355 stream with sorted() causes downstream ops not to be lazy
mike.duigou at oracle.com
Mon May 5 16:33:55 UTC 2014
Looks good to me.
On May 5 2014, at 06:16 , Paul Sandoz <paul.sandoz at oracle.com> wrote:
> This is an optimization to ensure that sorted() in sequential pipelines does not aggressively push all sorted elements downstream if the pipeline is known to be short-circuiting.
> Note that it is not an error that more elements, than strictly required to produce a result, may flow through the pipeline. This can occur, in general (not restricted to just sorting), for short-circuiting parallel pipelines.
More information about the core-libs-dev