[
https://issues.apache.org/jira/browse/AVRO-1533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14050798#comment-14050798
]
Doug Cutting commented on AVRO-1533:
------------------------------------
Graham, good catch. I did fix the new String(byte[]...) to specify the charset
as UTF-8 but forgot to update the patch. The getBytes call is on a
org.apache.avro.util.Utf8 instance, not a java.lang.String, so that's okay.
The commit diff is at:
https://svn.apache.org/viewvc/avro/trunk/lang/java/avro/src/main/java/org/apache/avro/io/ResolvingDecoder.java?r1=1607197&r2=1607196&pathrev=1607197
I think we're okay.
> permit promotions between string and bytes
> ------------------------------------------
>
> Key: AVRO-1533
> URL: https://issues.apache.org/jira/browse/AVRO-1533
> Project: Avro
> Issue Type: New Feature
> Components: java
> Reporter: Doug Cutting
> Assignee: Doug Cutting
> Fix For: 1.7.7
>
> Attachments: AVRO-1533.patch, AVRO-1533.patch
>
>
> Avro strings are a subset of bytes, so promoting from string to bytes is
> lossless and should be possible. Promotion from bytes to strings may cause
> problems, as not all byte strings are valid UTF8, but it also might be useful.
--
This message was sent by Atlassian JIRA
(v6.2#6252)