[
https://issues.apache.org/jira/browse/AVRO-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13009250#comment-13009250
]
Doug Cutting commented on AVRO-784:
-----------------------------------
I don't have a problem with the convention, I'm just paranoid about the
potential for name conflicts in generated code. My example above was not good,
however, as you point out.
We do need to worry about conflicts with names we inherit. From Object we
inherit 'getClass()' and from GenericContainer we inherit 'getSchema()', so I
think, if a field is named 'class' or 'schema' then we'll need to mangle the
generated accessor method. This actually requires *less* mangling than
un-prefixed names, since otherwise we'd need to mangle accessor names for
fields named 'wait', 'hashCode', 'equals', etc.
Also, if someone has a record with fields named "foo" and "Foo" then we'd be in
trouble.
> SpecificCompiler should generate accessors
> ------------------------------------------
>
> Key: AVRO-784
> URL: https://issues.apache.org/jira/browse/AVRO-784
> Project: Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.5.0
> Reporter: E. Sammer
> Labels: features
> Attachments: avro-784.diff
>
>
> Avro's Java SpecificCompiler should generate java bean style accessors.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira