--- jsr166/src/main/java/util/PriorityQueue.java 2013/01/16 15:06:10 1.81 +++ jsr166/src/main/java/util/PriorityQueue.java 2013/01/19 18:11:56 1.84 @@ -60,7 +60,7 @@ import java.util.function.Block; * the priority queue in any particular order. If you need ordered * traversal, consider using {@code Arrays.sort(pq.toArray())}. * - *

Note that this implementation is not synchronized. + *

Note that this implementation is not synchronized. * Multiple threads should not access a {@code PriorityQueue} * instance concurrently if any of the threads modifies the queue. * Instead, use the thread-safe {@link @@ -451,6 +451,7 @@ public class PriorityQueue extends Ab * this queue * @throws NullPointerException if the specified array is null */ + @SuppressWarnings("unchecked") public T[] toArray(T[] a) { if (a.length < size) // Make a new array of a's runtime type, but my contents: @@ -783,10 +784,10 @@ public class PriorityQueue extends Ab } // wrapping constructor in method avoids transient javac problems - final PriorityQueueSpliterator spliterator(int origin, int fence, + final PriorityQueueSpliterator spliterator(int origin, int fence, int expectedModCount) { - return new PriorityQueueSpliterator(this, origin, fence, - expectedModCount); + return new PriorityQueueSpliterator(this, origin, fence, + expectedModCount); } public Stream stream() {