Heiko Rupp created AVRO-2995:
--------------------------------

             Summary: ReflectData.getField throws NPE when the desired field is 
not in the data
                 Key: AVRO-2995
                 URL: https://issues.apache.org/jira/browse/AVRO-2995
             Project: Apache Avro
          Issue Type: Bug
          Components: java
    Affects Versions: 1.10.0
            Reporter: Heiko Rupp


I have a schema with fields \{ aname, acheckbox, anumber } and try to validate 
(from a Kafka Serde) and input of \{ foo:value, bar:value }.

The code looks for a field 'aname' and then does a 'get()' on it:

return getAccessorForField(record, name, pos, state).get(record);

As the field with name 'aname' is not in the input, the getAccessorForField() 
returns null.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to