[cvs] / jsr166 / src / main / java / util / PriorityQueue.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/PriorityQueue.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8, Tue Jul 1 16:29:45 2003 UTC revision 1.9, Sun Jul 13 22:51:22 2003 UTC
# Line 299  Line 299 
299          if (element == null)          if (element == null)
300              throw new NullPointerException();              throw new NullPointerException();
301          modCount++;          modCount++;
302            ++size;
303    
304          // Grow backing store if necessary          // Grow backing store if necessary
305          if (++size == queue.length) {          while (size >= queue.length) {
306              E[] newQueue = new E[2 * queue.length];              E[] newQueue = new E[2 * queue.length];
307              System.arraycopy(queue, 0, newQueue, 0, size);              System.arraycopy(queue, 0, newQueue, 0, queue.length);
308              queue = newQueue;              queue = newQueue;
309          }          }
310    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8