8343426: ConcurrentSkipListMap.spliterator() can no longer split the stream#21820
8343426: ConcurrentSkipListMap.spliterator() can no longer split the stream#21820kabutz wants to merge 3 commits into
Conversation
|
👋 Welcome back kabutz! A progress list of the required criteria for merging this PR into |
|
@kabutz This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 22 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@viktorklang-ora) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Webrevs
|
|
Hi @kabutz, |
|
Sure, where should I add that test? |
|
@kabutz I'd say either under its own directory |
|
@kabutz Let me know how you want to proceed. 👍 |
've made the changes and sent another PR to the branch holding the changes. Hope that's the right way of doing it... |
|
@kabutz Ah, so then you can close this PR? I'll have a look at the other PR. |
|
@kabutz Might actually be easier to drop the other PR and add the commits to your branch 8343426-cslm-spliterator-bug so this PR is updated. |
|
/integrate |
|
@kabutz This pull request has not yet been marked as ready for integration. |
|
/contributor add @DougLea |
|
@viktorklang-ora Only the author (@kabutz) is allowed to issue the |
|
@kabutz The OpenJDK bot doesn't trust me :-) would you mind adding Doug as a contributor? :) |
|
/contributor add @DougLea |
|
@kabutz |
viktorklang-ora
left a comment
There was a problem hiding this comment.
Nice catch, @kabutz !
|
/integrate |
|
/sponsor |
|
Going to push as commit 2b57f40.
Your commit was automatically rebased without conflicts. |
|
@viktorklang-ora @kabutz Pushed as commit 2b57f40. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Since Java 10, spliterators for the ConcurrentSkipListMap were pointing to the head, which has item == null, rather than to the first element. The trySplit() method no longer worked, and always returned null. Therefore, parallel streams have not worked for ConcurrentSkipListMap and ConcurrentSkipListSet since Java 10. It worked correctly in Java 8 and 9.
The problem lies in the constructor calls for the various spliterators. In Java 9, we pass in head.node.next as "origin" into the constructor. In Java 10, this was changed to just head.node as "origin". Since the "item" field is always null on head.node, we never enter the first if() statement in the trySplit() method and thus it always returns null.
Progress
Issue
Reviewers
Contributors
<dl@openjdk.org>Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21820/head:pull/21820$ git checkout pull/21820Update a local copy of the PR:
$ git checkout pull/21820$ git pull https://git.openjdk.org/jdk.git pull/21820/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 21820View PR using the GUI difftool:
$ git pr show -t 21820Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21820.diff
Using Webrev
Link to Webrev Comment