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.57 by jsr166, Mon Nov 28 02:44:06 2005 UTC vs.
Revision 1.58 by dl, Mon Nov 28 23:53:32 2005 UTC

# Line 229 | Line 229 | public class PriorityQueue<E> extends Ab
229          // Double size if small; else grow by 50%
230          int newCapacity = ((oldCapacity < 64)?
231                             ((oldCapacity + 1) * 2):
232 <                           ((oldCapacity * 3) / 2));
232 >                           ((oldCapacity / 2) * 3));
233 >        if (newCapacity < 0) // overflow
234 >            newCapacity = Integer.MAX_VALUE;
235          if (newCapacity < minCapacity)
236              newCapacity = minCapacity;
237          queue = Arrays.copyOf(queue, newCapacity);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines