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 2010/05/14 21:00:48 UTC

[jira] Commented: (AVRO-542) NPE in ReflectData

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

Doug Cutting commented on AVRO-542:
-----------------------------------

This looks like a duplicate of AVRO-86, which never got applied since it lacked a test case and we somehow lost track of it.  Maybe we should resolve this issue as a duplicate and set the priority and fix-version of AVRO-86 to make it a blocker for 1.4.0 so that we make sure it's fixed before the next release?  Does that sound like reasonable plan?  Maybe I can even find some time this afternoon to put together a test case...

> NPE in ReflectData 
> -------------------
>
>                 Key: AVRO-542
>                 URL: https://issues.apache.org/jira/browse/AVRO-542
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.3.2
>         Environment: Java
>            Reporter: Douglas Britsch
>
> On line 253 of ReflectData.java the package is retrieved with:
> String space = c.getPackage().getName();
> getPackage is documented to be able to return null, and in practice does with generated classes and in certain child classloader scenarios. A safer alternative would be to derive the package by parsing the string returned from the class's name:
> String space = c.getName().substring(0, name.lastIndexOf('.'); 
> Thanks

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