Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1832

Invoking toString() method unexpectedly modified the avro record.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.1
    • Component/s: java
    • Labels:
      None

      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

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                odidukh Oleksandr Didukh
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: