diff options
Diffstat (limited to 'third_party/protobuf/3.2.0/java/core/src/main/java/com/google/protobuf/FloatArrayList.java')
-rw-r--r-- | third_party/protobuf/3.2.0/java/core/src/main/java/com/google/protobuf/FloatArrayList.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/third_party/protobuf/3.2.0/java/core/src/main/java/com/google/protobuf/FloatArrayList.java b/third_party/protobuf/3.2.0/java/core/src/main/java/com/google/protobuf/FloatArrayList.java index 90d6154b15..76645583eb 100644 --- a/third_party/protobuf/3.2.0/java/core/src/main/java/com/google/protobuf/FloatArrayList.java +++ b/third_party/protobuf/3.2.0/java/core/src/main/java/com/google/protobuf/FloatArrayList.java @@ -30,8 +30,9 @@ package com.google.protobuf; -import com.google.protobuf.Internal.FloatList; +import static com.google.protobuf.Internal.checkNotNull; +import com.google.protobuf.Internal.FloatList; import java.util.Arrays; import java.util.Collection; import java.util.RandomAccess; @@ -41,9 +42,8 @@ import java.util.RandomAccess; * * @author dweis@google.com (Daniel Weis) */ -final class FloatArrayList - extends AbstractProtobufList<Float> - implements FloatList, RandomAccess { +final class FloatArrayList extends AbstractProtobufList<Float> + implements FloatList, RandomAccess, PrimitiveNonBoxingCollection { private static final FloatArrayList EMPTY_LIST = new FloatArrayList(); static { @@ -198,9 +198,7 @@ final class FloatArrayList public boolean addAll(Collection<? extends Float> collection) { ensureIsMutable(); - if (collection == null) { - throw new NullPointerException(); - } + checkNotNull(collection); // We specialize when adding another FloatArrayList to avoid boxing elements. if (!(collection instanceof FloatArrayList)) { |