1 |
|
/* |
2 |
|
* %W% %E% |
3 |
|
* |
4 |
< |
* Copyright 2005 Sun Microsystems, Inc. All rights reserved. |
4 |
> |
* Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
5 |
|
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. |
6 |
|
*/ |
7 |
|
|
8 |
|
package java.util; |
9 |
– |
import java.util.*; // for javadoc (till 6280605 is fixed) |
9 |
|
|
10 |
|
/** |
11 |
|
* Resizable-array implementation of the <tt>List</tt> interface. Implements |
189 |
|
*/ |
190 |
|
private void growArray(int minCapacity) { |
191 |
|
if (minCapacity < 0) // overflow |
192 |
< |
throw new OutOfMemoryError(); |
192 |
> |
throw new OutOfMemoryError(); |
193 |
|
int oldCapacity = elementData.length; |
194 |
|
// Double size if small; else grow by 50% |
195 |
|
int newCapacity = ((oldCapacity < 64)? |