You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Ismaël Mejía (JIRA)" <ji...@apache.org> on 2019/03/28 09:13:00 UTC

[jira] [Updated] (AVRO-2356) Encoder Cannot Be Null

     [ https://issues.apache.org/jira/browse/AVRO-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ismaël Mejía updated AVRO-2356:
-------------------------------
    Affects Version/s:     (was: 1.9.0)

> Encoder Cannot Be Null
> ----------------------
>
>                 Key: AVRO-2356
>                 URL: https://issues.apache.org/jira/browse/AVRO-2356
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java
>            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)