harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r982777 - /harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/util/ArrayList.java
Date Thu, 05 Aug 2010 20:50:11 GMT
Author: hindessm
Date: Thu Aug  5 20:50:10 2010
New Revision: 982777

URL: http://svn.apache.org/viewvc?rev=982777&view=rev
Log:
Adding more review comments.

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=982777&r1=982776&r2=982777&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  5 20:50:10 2010
@@ -373,6 +373,8 @@ public class ArrayList<E> extends Abstra
 
     private void growAtEnd(int required) {
         int lastIndex = firstIndex + size;
+        // REVIEW: Isn't this next condition just:
+        //         required < array.length - size ?
         if (firstIndex >= required - (array.length - lastIndex)) {
             // REVIEW: Should use size! We don't seem to need newLast
             //         - just use size calculated above
@@ -382,6 +384,8 @@ public class ArrayList<E> extends Abstra
             if (size > 0) {
                 System.arraycopy(array, firstIndex, array, 0, size);
                 int start = newLast < firstIndex ? firstIndex : newLast;
+                // REVIEW: I think we null too much
+                //         array.length should be lastIndex ?
                 Arrays.fill(array, start, array.length, null);
             }
             firstIndex = 0;



Mime
View raw message