hg: lambda/lambda/jdk: Fix for JDK-8013649.
paul.sandoz at oracle.com
paul.sandoz at oracle.com
Fri May 31 01:54:01 PDT 2013
Changeset: d3baf2241054
Author: psandoz
Date: 2013-05-31 10:53 +0200
URL: http://hg.openjdk.java.net/lambda/lambda/jdk/rev/d3baf2241054
Fix for JDK-8013649.
A call to forEachRemaning does not correctly check and set
the state to signal all elements have been traversed.
There are two conditions for traversal:
1) if the index into the entry table is less than the fence; or
2) if the current entry is not null.
forEachRemaining was only checking first condition before performing
traversal and only seeting the state associated with the first condition
rendering it false on subsequent calls.
If mixed traversal is performed this can result in forEachRemaining
not traversing elements or tryAdvance traversing previously traversed
elements.
! src/share/classes/java/util/HashMap.java
! src/share/classes/java/util/WeakHashMap.java
! test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java
More information about the lambda-dev
mailing list