--- jsr166/src/main/java/util/ArrayList.java 2008/05/18 23:59:57 1.27 +++ jsr166/src/main/java/util/ArrayList.java 2010/09/21 17:00:45 1.31 @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -18,9 +18,9 @@ * 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. + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ package java.util; @@ -120,9 +120,9 @@ public class ArrayList extends Abstra /** * Constructs an empty list with the specified initial capacity. * - * @param initialCapacity the initial capacity of the list - * @exception IllegalArgumentException if the specified initial capacity - * is negative + * @param initialCapacity the initial capacity of the list + * @throws IllegalArgumentException if the specified initial capacity + * is negative */ public ArrayList(int initialCapacity) { super(); @@ -179,7 +179,6 @@ public class ArrayList extends Abstra modCount++; int oldCapacity = elementData.length; if (minCapacity > oldCapacity) { - Object oldData[] = elementData; int newCapacity = (oldCapacity * 3)/2 + 1; if (newCapacity < minCapacity) newCapacity = minCapacity; @@ -892,7 +891,7 @@ public class ArrayList extends Abstra private final AbstractList parent; private final int parentOffset; private final int offset; - private int size; + int size; SubList(AbstractList parent, int offset, int fromIndex, int toIndex) { @@ -971,6 +970,7 @@ public class ArrayList extends Abstra public ListIterator listIterator(final int index) { checkForComodification(); rangeCheckForAdd(index); + final int offset = this.offset; return new ListIterator() { int cursor = index;