avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject avro git commit: AVRO-2061: Improve Invalid File Format Error Message
Date Mon, 14 Aug 2017 09:31:49 GMT
Repository: avro
Updated Branches:
  refs/heads/master 14488e35b -> 040a3be09


AVRO-2061: Improve Invalid File Format Error Message


Project: http://git-wip-us.apache.org/repos/asf/avro/repo
Commit: http://git-wip-us.apache.org/repos/asf/avro/commit/040a3be0
Tree: http://git-wip-us.apache.org/repos/asf/avro/tree/040a3be0
Diff: http://git-wip-us.apache.org/repos/asf/avro/diff/040a3be0

Branch: refs/heads/master
Commit: 040a3be09216f188dff2b1bf1c23d21ecd4a265c
Parents: 14488e3
Author: BELUGA BEHR <dam6923@gmail.com>
Authored: Mon Aug 14 11:24:20 2017 +0200
Committer: Gabor Szadovszky <gabor@apache.org>
Committed: Mon Aug 14 11:26:03 2017 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                      | 2 ++
 .../avro/src/main/java/org/apache/avro/file/DataFileStream.java  | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/040a3be0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b91ba5b..58bf78c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,8 @@ Trunk (not yet released)
 
     AVRO-2043: Move to java8
 
+    AVRO-2061: Improve Invalid File Format Error Message (Beluga Behr via gabor)
+
   NEW FEATURES
 
     AVRO-1704: Java: Add support for single-message encoding. (blue)

http://git-wip-us.apache.org/repos/asf/avro/blob/040a3be0/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java b/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java
index bfc53a0..0a27476 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/file/DataFileStream.java
@@ -99,10 +99,10 @@ public class DataFileStream<D> implements Iterator<D>, Iterable<D>,
Closeable {
     try {
       vin.readFixed(magic);                         // read magic
     } catch (IOException e) {
-      throw new IOException("Not a data file.", e);
+      throw new IOException("Not an Avro data file.", e);
     }
     if (!Arrays.equals(DataFileConstants.MAGIC, magic))
-      throw new IOException("Not a data file.");
+      throw new IOException("Not an Avro data file.");
 
     long l = vin.readMapStart();                  // read meta data
     if (l > 0) {


Mime
View raw message