You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "GregWhitsitt (JIRA)" <ji...@apache.org> on 2014/02/12 21:50:20 UTC

[jira] [Created] (AVRO-1457) ReadOnly ByteBuffer serialization mutates original state after writing

GregWhitsitt created AVRO-1457:
----------------------------------

             Summary: ReadOnly ByteBuffer serialization mutates original state after writing
                 Key: AVRO-1457
                 URL: https://issues.apache.org/jira/browse/AVRO-1457
             Project: Avro
          Issue Type: Bug
    Affects Versions: 1.7.4
            Reporter: GregWhitsitt


Using the GenericDatumWriter specifically, writing out an avro containing a read-only ByteBuffer changes state of the original object, making it unusable after the initial write.  Potentially either the ByteBuffer needs to be copied prior to writing if read-only, or the offset needs to be reset.  

I'll attach a simple test which shows the issue  



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)