You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Yang Yang (JIRA)" <ji...@apache.org> on 2011/09/01 07:24:09 UTC

[jira] [Updated] (AVRO-882) 2nd read on end of file gives error

     [ https://issues.apache.org/jira/browse/AVRO-882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yang Yang updated AVRO-882:
---------------------------

    Attachment: a.diff

I found the bug is slightly more involved than a  1-line change,

attached a patch that works, but apparently better organization around that code can be done by someone more familiar with the code

> 2nd read on end of file gives error
> -----------------------------------
>
>                 Key: AVRO-882
>                 URL: https://issues.apache.org/jira/browse/AVRO-882
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.5.2
>            Reporter: Yang Yang
>            Priority: Minor
>         Attachments: a.diff
>
>
> if I read on a empty file with BinaryDecoder, I get EOF, good,
> but with the current code, if I read it again with the same decoder, I
> get a IndexOutofBoundException, not EOF.
> it seems that always giving EOF should be a more desirable behavior.
> I can see a bug in BinaryEncoder that causes this.
> more details in :
> http://mail-archives.apache.org/mod_mbox/avro-user/201108.mbox/%3CCAAnh3_9_CQqbmt4VQYZg8-iKfO4nnLPcUZbBwd4kQoAvPEKGKQ@mail.gmail.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira