aboutsummaryrefslogtreecommitdiffhomepage
path: root/java/src/main/java/com/google/protobuf/ProtobufArrayList.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/main/java/com/google/protobuf/ProtobufArrayList.java')
-rw-r--r--java/src/main/java/com/google/protobuf/ProtobufArrayList.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/src/main/java/com/google/protobuf/ProtobufArrayList.java b/java/src/main/java/com/google/protobuf/ProtobufArrayList.java
index 759368c9..d2f82ac5 100644
--- a/java/src/main/java/com/google/protobuf/ProtobufArrayList.java
+++ b/java/src/main/java/com/google/protobuf/ProtobufArrayList.java
@@ -60,6 +60,10 @@ class ProtobufArrayList<E> extends AbstractProtobufList<E> {
list = new ArrayList<E>(toCopy);
}
+ ProtobufArrayList(int capacity) {
+ list = new ArrayList<E>(capacity);
+ }
+
@Override
public void add(int index, E element) {
ensureIsMutable();