While it could be argued that unbounded Spliterators should not report SIZED / 
SUBSIZED, GatherSink should report an unknown emission size, so switching to 
downstream.begin(-1) rather than downstream.begin(size).

Includes a regression test which yields an OOME if this change is omitted.

-------------

Commit messages:
 - No forced sequential needed
 - Amends GatherSink to propagate that the resulting output is unknown (-1) 
rather than passing on the upstream size

Changes: https://git.openjdk.org/jdk/pull/25418/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25418&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8357647
  Stats: 40 lines in 2 files changed: 37 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/25418.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25418/head:pull/25418

PR: https://git.openjdk.org/jdk/pull/25418

Reply via email to