diff options
Diffstat (limited to 'java/core/src/main/java/com/google/protobuf/FieldSet.java')
-rw-r--r-- | java/core/src/main/java/com/google/protobuf/FieldSet.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/java/core/src/main/java/com/google/protobuf/FieldSet.java b/java/core/src/main/java/com/google/protobuf/FieldSet.java index a828f30e..8a9239ed 100644 --- a/java/core/src/main/java/com/google/protobuf/FieldSet.java +++ b/java/core/src/main/java/com/google/protobuf/FieldSet.java @@ -30,8 +30,9 @@ package com.google.protobuf; -import com.google.protobuf.LazyField.LazyIterator; +import static com.google.protobuf.Internal.checkNotNull; +import com.google.protobuf.LazyField.LazyIterator; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; @@ -385,9 +386,7 @@ final class FieldSet<FieldDescriptorType extends */ private static void verifyType(final WireFormat.FieldType type, final Object value) { - if (value == null) { - throw new NullPointerException(); - } + checkNotNull(value); boolean isValid = false; switch (type.getJavaType()) { |