# | Line 453 | Line 453 | public class PriorityQueue<E> extends Ab | |
---|---|---|
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()); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |