[jdk21u-dev] RFR: 8343426: ConcurrentSkipListMap.spliterator() can no longer split the stream

Satyen Subramaniam ssubramaniam at openjdk.org
Tue Jun 17 17:33:39 UTC 2025


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.

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

Commit messages:
 - Backport 2b57f402c46104d4aba784a891ba90604f5e9e4c

Changes: https://git.openjdk.org/jdk21u-dev/pull/1895/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=1895&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8343426
  Stats: 40 lines in 2 files changed: 31 ins; 0 del; 9 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/1895.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/1895/head:pull/1895

PR: https://git.openjdk.org/jdk21u-dev/pull/1895


More information about the jdk-updates-dev mailing list