ArrayList.java (addAll(int,Collection)): System.arraycopy all of the remaining elements.
* java/util/ArrayList.java (addAll(int,Collection)): System.arraycopy
all of the remaining elements.
* java/util/Vector.java (addAll(int,Collection)): Likewise.
(removeRange): If toIndex == fromIndex do
nothing, if toIndex < fromIndex throw IndexOutIfBoundsException.
(removeAll): Always throw NullPointerException when collection is
null.
(retrainAll): Likewise.
From-SVN: r51979
This commit is contained in:
committed by
Mark Wielaard
parent
0154eaa812
commit
236fc6a041
@@ -427,8 +427,8 @@ public class ArrayList extends AbstractList
|
||||
if (csize + size > data.length)
|
||||
ensureCapacity(size + csize);
|
||||
int end = index + csize;
|
||||
if (index != size)
|
||||
System.arraycopy(data, index, data, end, csize);
|
||||
if (size > 0 && index != size)
|
||||
System.arraycopy(data, index, data, end, size - index);
|
||||
size += csize;
|
||||
for ( ; index < end; index++)
|
||||
data[index] = itr.next();
|
||||
|
||||
Reference in New Issue
Block a user