--- old/src/share/classes/java/util/LinkedList.java 2013-05-01 15:37:30.095358668 -0700 +++ new/src/share/classes/java/util/LinkedList.java 2013-05-01 15:37:29.943358674 -0700 @@ -954,10 +954,10 @@ Objects.requireNonNull(action); while (modCount == expectedModCount && nextIndex < size) { action.accept(next.item); + lastReturned = next; next = next.next; nextIndex++; } - lastReturned = next; checkForComodification(); }