Tycho Lamerigts created AVRO-1638:
-------------------------------------
Summary: SpecificDatumReader cannot read inner classes
Key: AVRO-1638
URL: https://issues.apache.org/jira/browse/AVRO-1638
Project: Avro
Issue Type: Bug
Components: java
Affects Versions: 1.7.7
Reporter: Tycho Lamerigts
After generating Specific classes from the attached avro file's schema, the
file's content cannot be read by the following code.
{code}
DatumReader<Foo> r = new SpecificDatumReader<>(Foo.class);
DataFileReader<Foo> fr = new DataFileReader<>(new File("foo.avro"), r);
fr.next(); // this will throw
{code}
It appears to me that the logic in SpecificData#getClassName for dealing with
names ending with '$' is incorrect, which causes avro to fall back to
GenericDatumReader and ultimately fail.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)