[10] RFR 8193856 takeWhile produces incorrect result with elements produced by flatMap (original) (raw)
Stuart Marks stuart.marks at oracle.com
Thu Dec 21 00:34:59 UTC 2017
- Previous message: [10] RFR 8193856 takeWhile produces incorrect result with elements produced by flatMap
- Next message: RFR (JDK10/JAXP Doc-only) 8193568 : @LastModified tag in license header
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [10] RFR 8193856 takeWhile produces incorrect result with elements produced by flatMap
- Next message: RFR (JDK10/JAXP Doc-only) 8193568 : @LastModified tag in license header
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]