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:08:00 UTC

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

rajesh nagaraju created AVRO-2797:
-------------------------------------

             Summary: 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


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)