You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "rajesh nagaraju (Jira)" <ji...@apache.org> on 2020/04/13 06:11:00 UTC

[jira] [Updated] (AVRO-2797) Improper handling of Exception

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

rajesh nagaraju updated AVRO-2797:
----------------------------------
      Attachment: DataFileStream.java
    Release Note: Proper exception handling for EOFException 
          Status: Patch Available  (was: Open)

> Improper handling of Exception
> ------------------------------
>
>                 Key: AVRO-2797
>                 URL: https://issues.apache.org/jira/browse/AVRO-2797
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.9.2, 1.7.6
>            Reporter: rajesh nagaraju
>            Priority: Major
>         Attachments: DataFileStream.java
>
>
> The EOFException is not properly handled in the 
> org/apache/avro/file/DataFileStream.java. In our use case we are trying to read an avro file, however incomplete records are ignored. The EOFException is caught and returns false which is misleading, it should throw back the AvroRuntimeException with EOFException.
> So the code should be,
> catch (EOFException e) { // at EOF
>       throw new AvroRuntimeException(e);
>     }
> instead of 
> catch (EOFException e) { // at EOF
>       return false;
>     }
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)