On 12/20/17 1:28 PM, Paul Sandoz wrote:
Please review this fix for a bug in the stream takeWhile operation: http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8193856-takeWhile-incorrect-results/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8193856-takeWhile-incorrect-results/webrev/> The flatMap operation is currently aggressive and does not detect if a downstream operation may or has cancelled processing, and will push all of it’s elements downstream. Short-circuiting operations should be guarded against such behaviour but unfortunately takeWhile was not guarded.
Hi Paul, Change looks fine. Good to get this one into JDK 10. Thanks, s'marks