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

Doug Cutting commented on AVRO-257:
-----------------------------------

> if datum is null, validate should always return false

No, a record cannot be null.  But a union that contains a null schema or a null 
schema itself can be null.  And, as much as possible, we want to permit folks 
to build new data representations that might map Java types to Avro types 
differently, i.e., to permit a zero-length Avro string to be represented as 
null or something crazy like that.

> 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