# | Line 448 | Line 448 | public class PriorityQueue<E> extends Ab | |
---|---|---|
448 | * @throws NullPointerException if the specified array is null | |
449 | */ | |
450 | public <T> T[] toArray(T[] a) { | |
451 | + | final int size = this.size; |
452 | if (a.length < size) | |
453 | // Make a new array of a's runtime type, but my contents: | |
454 | return (T[]) Arrays.copyOf(queue, size, a.getClass()); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |