Michael Knapp created AVRO-1472:
-----------------------------------

             Summary: Usage of Parser is Wrong in Getting Started Guide
                 Key: AVRO-1472
                 URL: https://issues.apache.org/jira/browse/AVRO-1472
             Project: Avro
          Issue Type: Improvement
    Affects Versions: 1.7.6, 1.7.5, 1.7.4
            Reporter: Michael Knapp
            Priority: Minor


In the Getting Started Guide for java, in the "Serializing and deserializing 
without code generation" section, for versions 1.7.4 and later, I still see 
this:

Schema schema = new Parser().parse(new File("user.avsc"));

This is COMPLETELY confusing to people, I am assuming now that you have 
imported org.apache.avro.Schema.Parser, but that is not clear to the users.

There is also a class in avro called org.apache.avro.io.parsing.Parser, most 
users would look at your "Parser" in the example and think you are talking 
about "org.apache.avro.io.parsing.Parser", when you are actually talking about 
"org.apache.avro.Schema.Parser"

I just wasted the last hour of my life trying to figure this out.  Please fix 
your documentation.  Either tell people exactly what parser you are importing, 
or explicitly state it like this:

Schema schema = new Schema.Parser().parse(in);



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to