[ 
https://issues.apache.org/jira/browse/AVRO-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16803724#comment-16803724
 ] 

ASF subversion and git services commented on AVRO-2356:
-------------------------------------------------------

Commit 8f0eca6990a584707c0cc7690fc1d325803a5287 in avro's branch 
refs/heads/master from Beluga Behr
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=8f0eca6 ]

AVRO-2356: Encoder Cannot Be Null


> Encoder Cannot Be Null
> ----------------------
>
>                 Key: AVRO-2356
>                 URL: https://issues.apache.org/jira/browse/AVRO-2356
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.9.0
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>
> I was recently doing some debugging and writing tests for Avro and I received 
> the following stack trace:
> {code}
> java.lang.NullPointerException: null of E in field f of R
>       at 
> org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:147)
>       at 
> org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:141)
>       at 
> org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:77)
>       at 
> org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:64)
> {code}
> That took me quite awhile to decipher.  How about me Avro a library for 
> laypeople.  I propose:
> {code}
> java.lang.NullPointerException: Encoder cannot be null
>       at java.util.Objects.requireNonNull(Objects.java:228)
>       at 
> org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:63)
>       at 
> org.apache.avro.test.basic.ExtendedEnumPerf.encode(ExtendedEnumPerf.java:26)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to