[
https://issues.apache.org/jira/browse/AVRO-2121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebastien Dubois updated AVRO-2121:
-----------------------------------
Issue Type: Bug (was: Improvement)
> GenericDatumWriter#writeWithoutConversion throws NullPointerException
> ---------------------------------------------------------------------
>
> Key: AVRO-2121
> URL: https://issues.apache.org/jira/browse/AVRO-2121
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.8.2
> Reporter: Sebastien Dubois
> Priority: Minor
>
> Currently, GenericDatumWriter#writeWithoutConversion throws an NPE if some
> field is not defined as it should according to the schema.
> I guess this is a matter of test, but as API client I'd like to rather get
> back an Avro-specific (runtime) exception (e.g., AvroWriteException), even if
> it wraps around an NPE. This makes it much more natural for writing libraries
> around.
> With the code as it stands, my only choice to handle this would be to
> try/catch(npe), which doesn't feel great.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)