You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ie...@apache.org on 2019/03/28 09:12:16 UTC
[avro] branch master updated: AVRO-2356: Encoder Cannot Be Null
This is an automated email from the ASF dual-hosted git repository.
iemejia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 8f0eca6 AVRO-2356: Encoder Cannot Be Null
8f0eca6 is described below
commit 8f0eca6990a584707c0cc7690fc1d325803a5287
Author: Beluga Behr <da...@gmail.com>
AuthorDate: Fri Mar 22 10:07:13 2019 -0400
AVRO-2356: Encoder Cannot Be Null
---
.../avro/src/main/java/org/apache/avro/generic/GenericDatumWriter.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumWriter.java b/lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumWriter.java
index 25ba68c..f112399 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumWriter.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/generic/GenericDatumWriter.java
@@ -22,6 +22,7 @@ import java.nio.ByteBuffer;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.Map;
+import java.util.Objects;
import java.util.Collection;
import org.apache.avro.AvroRuntimeException;
@@ -67,6 +68,7 @@ public class GenericDatumWriter<D> implements DatumWriter<D> {
}
public void write(D datum, Encoder out) throws IOException {
+ Objects.requireNonNull(out, "Encoder cannot be null");
write(root, datum, out);
}