diff --git a/classpath/java/util/ArrayList.java b/classpath/java/util/ArrayList.java index bcc3810c82..61cd5edbbf 100644 --- a/classpath/java/util/ArrayList.java +++ b/classpath/java/util/ArrayList.java @@ -65,6 +65,10 @@ public class ArrayList extends AbstractList implements java.io.Serializabl return size; } + public void ensureCapacity(int capacity) { + grow(capacity); + } + public boolean contains(Object element) { for (int i = 0; i < size; ++i) { if (equal(element, array[i])) {