You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2009/12/15 22:19:35 UTC

[jira] Commented: (AVRO-257) Dead code removal

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

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

I think the 'instanceof Object' should be replaced with a null check before the call to datum.getClass().  If it's non-null it has to be an Object, but it might be null, no?

The rest of the patch looks good to me.


> 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.