diff -r 5be308124a22 -r 83f87aff7b07 jdk/src/share/classes/java/util/concurrent/LinkedBlockingDeque.java --- a/jdk/src/share/classes/java/util/concurrent/LinkedBlockingDeque.java Fri Aug 16 13:58:43 2013 -0400 +++ b/jdk/src/share/classes/java/util/concurrent/LinkedBlockingDeque.java Tue Aug 06 14:26:34 2013 +0100 @@ -1008,12 +1008,8 @@ * Returns an iterator over the elements in this deque in proper sequence. * The elements will be returned in order from first (head) to last (tail). * - *

The returned iterator is a "weakly consistent" iterator that - * will never throw {@link java.util.ConcurrentModificationException - * ConcurrentModificationException}, and guarantees to traverse - * elements as they existed upon construction of the iterator, and - * may (but is not guaranteed to) reflect any modifications - * subsequent to construction. + *

The returned iterator is + * weakly consistent. * * @return an iterator over the elements in this deque in proper sequence */ @@ -1026,12 +1022,8 @@ * sequential order. The elements will be returned in order from * last (tail) to first (head). * - *

The returned iterator is a "weakly consistent" iterator that - * will never throw {@link java.util.ConcurrentModificationException - * ConcurrentModificationException}, and guarantees to traverse - * elements as they existed upon construction of the iterator, and - * may (but is not guaranteed to) reflect any modifications - * subsequent to construction. + *

The returned iterator is + * weakly consistent. * * @return an iterator over the elements in this deque in reverse order */ @@ -1270,6 +1262,22 @@ } } + /** + * Returns a {@link Spliterator} over the elements in this deque. + * + *

The returned spliterator is + * weakly consistent. + * + *

The {@code Spliterator} reports {@link Spliterator#CONCURRENT}, + * {@link Spliterator#ORDERED}, and {@link Spliterator#NONNULL}. + * + * @implNote + * The {@code Spliterator} implements {@code trySplit} to permit limited + * parallelism. + * + * @return a {@code Spliterator} over the elements in this deque + * @since 1.8 + */ public Spliterator spliterator() { return new LBDSpliterator(this); } @@ -1277,6 +1285,8 @@ /** * Saves this deque to a stream (that is, serializes it). * + * @param s the stream + * @throws java.io.IOException if an I/O error occurs * @serialData The capacity (int), followed by elements (each an * {@code Object}) in the proper order, followed by a null */ @@ -1299,6 +1309,10 @@ /** * Reconstitutes this deque from a stream (that is, deserializes it). + * @param s the stream + * @throws ClassNotFoundException if the class of a serialized object + * could not be found + * @throws java.io.IOException if an I/O error occurs */ private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {