You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Steve Zesch (JIRA)" <ji...@apache.org> on 2013/04/23 17:05:17 UTC

[jira] [Commented] (AVRO-1309) ProtobufData does not correctly handle nested enums

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

Steve Zesch commented on AVRO-1309:
-----------------------------------

This works.
                
> ProtobufData does not correctly handle nested enums
> ---------------------------------------------------
>
>                 Key: AVRO-1309
>                 URL: https://issues.apache.org/jira/browse/AVRO-1309
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.4
>            Reporter: Steve Zesch
>            Assignee: Doug Cutting
>             Fix For: 1.7.5
>
>         Attachments: AVRO-1309.patch, cnfe_protobuf_stack_trace.txt
>
>
> When an enum is nested in several messages, a ClassNotFoundException is thrown when calling the DataFileWriter append method. I've attached a stack trace.
> The offending line (ProtobufData.java 112):
> Class c = Class.forName(SpecificData.getClassName(s));
> Say we have an enum nested as follows (I've left out some syntax):
> {code}
> message A
>   message B
>     message C
>       enum D
> {code}
> Expected class name: org.foo.bar.A$B$C$D
> Actual class name being returned: org.foo.bar.A$D
> Only the package name, outer class, and enum class name are being taken into consideration. All parent classes besides the outer class are ignored. Nested messages are not afflicted by the same problem because they are resolved recursively.
> Please let me know if you require any more information or if anything is unclear.
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira