diff -r 8b9cacdadb2d -r 1d31e540bfcb jdk/src/java.base/share/classes/java/util/concurrent/DelayQueue.java --- a/jdk/src/java.base/share/classes/java/util/concurrent/DelayQueue.java Wed Dec 21 14:22:53 2016 -0800 +++ b/jdk/src/java.base/share/classes/java/util/concurrent/DelayQueue.java Wed Dec 21 14:26:52 2016 -0800 @@ -547,8 +547,7 @@ public E next() { if (cursor >= array.length) throw new NoSuchElementException(); - lastRet = cursor; - return (E)array[cursor++]; + return (E)array[lastRet = cursor++]; } public void remove() {