diff -r 5be308124a22 -r 83f87aff7b07 jdk/src/share/classes/java/util/concurrent/LinkedBlockingQueue.java --- a/jdk/src/share/classes/java/util/concurrent/LinkedBlockingQueue.java Fri Aug 16 13:58:43 2013 -0400 +++ b/jdk/src/share/classes/java/util/concurrent/LinkedBlockingQueue.java Tue Aug 06 14:26:34 2013 +0100 @@ -766,12 +766,8 @@ * Returns an iterator over the elements in this queue 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 queue in proper sequence */ @@ -973,6 +969,22 @@ } } + /** + * Returns a {@link Spliterator} over the elements in this queue. + * + *

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 queue + * @since 1.8 + */ public Spliterator spliterator() { return new LBQSpliterator(this); } @@ -980,6 +992,8 @@ /** * Saves this queue to a stream (that is, serializes it). * + * @param s the stream + * @throws java.io.IOException if an I/O error occurs * @serialData The capacity is emitted (int), followed by all of * its elements (each an {@code Object}) in the proper order, * followed by a null @@ -1005,6 +1019,10 @@ /** * Reconstitutes this queue 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 {