Description
We use Apache Avro in our project and wanted to update it to 1.8.0 version.
In our case avro records contain fields with "type": "bytes".
We need to convert generated avro record to byte array. This usually works fine, however, if we log the record (or apply any other operations that invoke toString() method on org.apache.avro.specific.SpecificRecordBase) this functionality is broken. Looks like the root cause of the issue is in this line:
https://github.com/apache/avro/pull/88/files#diff-5a41450f3008ee0da59dec14ada2356aL551
Please review fix and corresponding test in this pull request.
Attachments
Issue Links
- duplicates
-
AVRO-1799 java: GenericData.toString() mutates underlying ByteBuffer backed data
- Resolved