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.23 by jsr166, Sun Jan 7 07:38:27 2007 UTC

# Line 1 | Line 1
1   /*
2   * %W% %E%
3   *
4 < * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
4 > * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
5   * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6   */
7  
# 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