ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/ArrayList.java
(Generate patch)

Comparing jsr166/src/main/java/util/ArrayList.java (file contents):
Revision 1.21 by jsr166, Sun May 28 23:36:29 2006 UTC vs.
Revision 1.22 by jsr166, Mon Jun 26 01:38:57 2006 UTC

# Line 135 | Line 135 | public class ArrayList<E> extends Abstra
135              elementData = Arrays.copyOf(elementData, size, Object[].class);
136      }
137  
138    private void initFromConcurrentlyMutating(Collection<? extends E> c) {
139        elementData = c.toArray();
140        size = elementData.length;
141        // c.toArray might (incorrectly) not return Object[] (see 6260652)
142        if (elementData.getClass() != Object[].class)
143            elementData = Arrays.copyOf(elementData, size, Object[].class);
144    }
145
146    private final static Object UNALLOCATED = new Object();
147
138      /**
139       * Trims the capacity of this <tt>ArrayList</tt> instance to be the
140       * list's current size.  An application can use this operation to minimize

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines