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

Kevin Oliver commented on AVRO-257:
-----------------------------------

Yes, datum can definitely be null (I just made the change locally because datum 
was being dereferenced on the line before).

So it feels like the contract to validate(Schema, Object) should be that if 
datum is null, validate should always return false. And if thats the case, 
should I also modify SpecificRecord and GenericData's implementations to behave 
this way?

> Dead code removal
> -----------------
>
>                 Key: AVRO-257
>                 URL: https://issues.apache.org/jira/browse/AVRO-257
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>            Reporter: Kevin Oliver
>            Priority: Trivial
>             Fix For: 1.3.0
>
>         Attachments: AVRO-257.patch
>
>
> There is dead code in org.apache.avro.reflect.ReflectData.validate().  The 
> code is checking if datum is not an instance of Object. But it always is, as 
> it is declared as Object and it is not null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to