--- jsr166/src/main/java/util/ArrayList.java 2006/04/21 20:49:03 1.20 +++ jsr166/src/main/java/util/ArrayList.java 2007/05/20 07:54:01 1.24 @@ -1,8 +1,26 @@ /* - * %W% %E% + * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. */ package java.util; @@ -66,7 +84,7 @@ package java.util; * should be used only to detect bugs.

* * This class is a member of the - * + * * Java Collections Framework. * * @author Josh Bloch @@ -135,16 +153,6 @@ public class ArrayList extends Abstra elementData = Arrays.copyOf(elementData, size, Object[].class); } - private void initFromConcurrentlyMutating(Collection c) { - elementData = c.toArray(); - size = elementData.length; - // c.toArray might (incorrectly) not return Object[] (see 6260652) - if (elementData.getClass() != Object[].class) - elementData = Arrays.copyOf(elementData, size, Object[].class); - } - - private final static Object UNALLOCATED = new Object(); - /** * Trims the capacity of this ArrayList instance to be the * list's current size. An application can use this operation to minimize