[
https://issues.apache.org/jira/browse/AVRO-897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123118#comment-13123118
]
Doug Cutting commented on AVRO-897:
-----------------------------------
This is addressed by the patch for AVRO-803, described in the comment at
http://s.apache.org/VJC.
GenericDatumReader will now use java.lang.String everywhere when string schemas
are annotated with "avro.java.string":"String". There's a GenericData method
to add this annotation. This is perhaps not ideal but it is back-compatible
which is important.
Can we close this issue as a duplicate of AVRO-803?
> Map lookup behavior is ill-defined in Java
> ------------------------------------------
>
> Key: AVRO-897
> URL: https://issues.apache.org/jira/browse/AVRO-897
> Project: Avro
> Issue Type: Bug
> Affects Versions: 1.5.1
> Reporter: Garrett Wu
> Attachments: avro-charsequence-map-test.tar.gz
>
>
> In Java, an Avro {{"map"}} is a Java {{Map}}. The map keys are type
> {{"string"}}, which maps to a Java {{CharSequence}}.
> Clients must know to use {{Utf8}} objects when calling {{get()}} or
> {{containsKey()}}. Instead, {{GenericDatumReader}} should instantiate a
> {{Map}} instance with a {{Comparator}} suitable for comparing any type of
> {{CharSequence}}.
--
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