[10] RFR 8075939: Stream.flatMap() causes breaking of short-circuiting of terminal operations

Paul Sandoz paul.sandoz at oracle.com
Thu Dec 21 22:40:18 UTC 2017


Hi,

Please review the following webrev that makes flatMap non-aggressive when pushing elements downstream if any downstream operation is short-circuiting.

  http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8075939-flatMap-aggressive-push/webrev/index.html <http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8075939-flatMap-aggressive-push/webrev/index.html>

This enables support for flat mapping to an infinite stream (assuming there is a downstream short-circuiting operation to terminate the stream computation).

Thanks,
Paul.


More information about the core-libs-dev mailing list