[
https://issues.apache.org/jira/browse/AVRO-1309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Doug Cutting updated AVRO-1309:
-------------------------------
Attachment: AVRO-1309.patch
Here's a patch that should fix this.
Please let me know if this works for you.
> 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
> 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