ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/PriorityQueue.java
(Generate patch)

Comparing jsr166/src/main/java/util/PriorityQueue.java (file contents):
Revision 1.82 by jsr166, Wed Jan 16 21:18:50 2013 UTC vs.
Revision 1.85 by jsr166, Sat Jan 19 18:18:10 2013 UTC

# Line 451 | Line 451 | public class PriorityQueue<E> extends Ab
451       *         this queue
452       * @throws NullPointerException if the specified array is null
453       */
454 +    @SuppressWarnings("unchecked")
455      public <T> T[] toArray(T[] a) {
456 +        final int size = this.size;
457          if (a.length < size)
458              // Make a new array of a's runtime type, but my contents:
459              return (T[]) Arrays.copyOf(queue, size, a.getClass());
# Line 785 | Line 787 | public class PriorityQueue<E> extends Ab
787      // wrapping constructor in method avoids transient javac problems
788      final PriorityQueueSpliterator<E> spliterator(int origin, int fence,
789                                                    int expectedModCount) {
790 <        return new PriorityQueueSpliterator(this, origin, fence,
791 <                                            expectedModCount);
790 >        return new PriorityQueueSpliterator<E>(this, origin, fence,
791 >                                               expectedModCount);
792      }
793  
794      public Stream<E> stream() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines