harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r984613 - /harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/util/ArrayList.java
Date Wed, 11 Aug 2010 22:52:45 GMT
Author: hindessm
Date: Wed Aug 11 22:52:45 2010
New Revision: 984613

URL: http://svn.apache.org/viewvc?rev=984613&view=rev
Log:
Remove review comment which is easily clarified.

Remove pointless conditiion that I forgot to remove when changing
tracking lastIndex to tracking size.  It used to say:

  if (firstIndex == 0 && lastIndex == array.length) {

but I think the only way this can happen is:

  if (size == array.length)

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=984613&r1=984612&r2=984613&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
Wed Aug 11 22:52:45 2010
@@ -115,9 +115,6 @@ public class ArrayList<E> extends Abstra
                             Integer.valueOf(size)));
         }
         if (location == 0) {
-            // REVIEW: Does growAtFront() check the end to see if
-            //         shifting the array is possible? Same for
-            //         growAtEnd().
             if (firstIndex == 0) {
                 growAtFront(1);
             }
@@ -129,7 +126,7 @@ public class ArrayList<E> extends Abstra
             }
             array[firstIndex + size] = object;
         } else { // must be case: (0 < location && location < size)
-            if (firstIndex == 0 && size == array.length) {
+            if (size == array.length) {
                 growForInsert(location, 1);
             } else if ((location < size / 2 && firstIndex > 0)
                     || firstIndex + size == array.length) {



Mime
View raw message