[jdk21u-dev] RFR: 8343426: ConcurrentSkipListMap.spliterator() can no longer split the stream
Satyen Subramaniam
ssubramaniam at openjdk.org
Fri Jun 20 04:56:33 UTC 2025
On Tue, 17 Jun 2025 17:28:11 GMT, Satyen Subramaniam <ssubramaniam at openjdk.org> wrote:
> Backporting JDK-8343426: ConcurrentSkipListMap.spliterator() can no longer split the stream. Since Java 10, the trySplit() method for spliterators for the ConcurrentSkipListMap always returned null, causing parallel streams to be broken for ConcurrentSkipListMap and ConcurrentSkipListSet since. This change fixes the logic for considering the head.node.next field in addition to head.node. Ran GHA Sanity Checks, local Tier 1 and 2, and new test directly. Patch is clean.
Took a look through the git history, having a hard time pinpointing the exact breaking change between Java 9 and 10. Planning to take a second look, in the meantime opened a PR for the referenced follow up issue: https://github.com/openjdk/jdk21u-dev/pull/1906. Will get that reviewed and re-create approval request here (and create one there)
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1895#issuecomment-2989791454
More information about the jdk-updates-dev
mailing list