diff --git a/classlib/src/main/java/org/teavm/classlib/java/util/TArrayList.java b/classlib/src/main/java/org/teavm/classlib/java/util/TArrayList.java index e72dbe8e7..7c02f3a25 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/util/TArrayList.java +++ b/classlib/src/main/java/org/teavm/classlib/java/util/TArrayList.java @@ -53,7 +53,7 @@ public class TArrayList extends TAbstractList implements TCloneable, TSeri public void ensureCapacity(int minCapacity) { if (array.length < minCapacity) { - array = TArrays.copyOf(array, array.length + TMath.min(5, array.length / 2)); + array = TArrays.copyOf(array, array.length + TMath.max(5, array.length / 2)); } }