You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (Resolved) (JIRA)" <ji...@apache.org> on 2011/10/07 21:30:29 UTC
[jira] [Resolved] (AVRO-909) change generated getter methods for
string fields to return java.lang.String instead of Utf8
[ https://issues.apache.org/jira/browse/AVRO-909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting resolved AVRO-909.
-------------------------------
Resolution: Won't Fix
Fix Version/s: (was: 1.6.0)
Assignee: (was: Doug Cutting)
This is addressed in AVRO-803.
> change generated getter methods for string fields to return java.lang.String instead of Utf8
> --------------------------------------------------------------------------------------------
>
> Key: AVRO-909
> URL: https://issues.apache.org/jira/browse/AVRO-909
> Project: Avro
> Issue Type: Sub-task
> Components: java
> Reporter: Doug Cutting
>
> A field X of type string might generate:
> {code}
> public CharSequence x; // for back compatibility
> public void setX(String s) {
> if (x instanceof Utf8)
> x.set(s);
> else
> x = new Utf8(s);
> }
> public String getX() { return x.toString(); }
> {code}
> The accessor methods have not yet been released, so this would be a compatible change in 1.6. Applications that wished to use Utf8 directly for performance could still use the field directly. Utf8 could be improved to lazily convert between byte[] and String representations.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira