[ https://issues.apache.org/jira/browse/AVRO-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802414#action_12802414 ]
Doug Cutting commented on AVRO-350: ----------------------------------- This might be reasonable. It is certainly back-compatible. Throwing an exception for accesses to unset fields might catch application errors earlier. So alternately we might add a 'boolean isSet(String name)' method and improve the error message when attempting to access an unset field. Null is a valid Avro value, so setting something to null is different than having it unset. Thoughts? > NPE on GenericData.Record.get(String) for a field that doesn't exist > -------------------------------------------------------------------- > > Key: AVRO-350 > URL: https://issues.apache.org/jira/browse/AVRO-350 > Project: Avro > Issue Type: Sub-task > Components: java > Affects Versions: 1.3.0 > Reporter: Kevin Oliver > Attachments: AVRO-350.patch > > > After the change in AVRO-278 to use arrays, GenericData.Record.get() gives an > NPE if you ask for a field that doesn't exist in the schema. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.