harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r984784 - /harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/util/ArrayList.java
Date Thu, 12 Aug 2010 13:59:07 GMT
Author: hindessm
Date: Thu Aug 12 13:59:07 2010
New Revision: 984784

URL: http://svn.apache.org/viewvc?rev=984784&view=rev
Log:
We've just created newArray with length "size + increment" so
"newArray.length - size" is just "increment".

Modified:
    harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/util/ArrayList.java

Modified: harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/util/ArrayList.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/util/ArrayList.java?rev=984784&r1=984783&r2=984784&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/util/ArrayList.java
(original)
+++ harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/util/ArrayList.java
Thu Aug 12 13:59:07 2010
@@ -403,8 +403,7 @@ public class ArrayList<E> extends Abstra
             }
             E[] newArray = newElementArray(size + increment);
             if (size != 0) {
-                System.arraycopy(array, firstIndex, newArray, newArray.length
-                        - size, size);
+                System.arraycopy(array, firstIndex, newArray, increment, size);
             }
             firstIndex = newArray.length - size;
             array = newArray;



Mime
View raw message