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

java: GenericData.toString() mutates underlying ByteBuffer backed data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.8.0
    • 1.9.0
    • java
    • None

    Description

      Around line 550, the writeEscapedString() method, used to serialize a byte array, will alter the underlying ByteBuffer's pointer. Meaning subsequent uses of a toString()'d avro object will yield different results.

      Need to not use a generic decode on a ByteBuffer; either clone the element (expensive), or iterate over the elements with an external index.

      Attachments

        Issue Links

          Activity

            People

              rdblue Ryan Blue
              gcmcnutt Greg McNutt
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: