avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject avro git commit: AVRO-1823: Java: Do not swallow IOException while reading magic bytes. Contributed by Koji Noguchi.
Date Sat, 16 Apr 2016 21:29:38 GMT
Repository: avro
Updated Branches:
  refs/heads/master 58daaf08a -> f4f226378


AVRO-1823: Java: Do not swallow IOException while reading magic bytes. Contributed by Koji
Noguchi.


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

Branch: refs/heads/master
Commit: f4f226378918cce8a722d9795f3df4a6c7219746
Parents: 58daaf0
Author: Ryan Blue <blue@apache.org>
Authored: Sat Apr 16 14:28:51 2016 -0700
Committer: Ryan Blue <blue@apache.org>
Committed: Sat Apr 16 14:28:51 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/avro/blob/f4f22637/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f656de3..c7fa2dc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -19,6 +19,9 @@ Trunk (not yet released)
 
     AVRO-1701: Fix for "warning: comparison between 'const enum testgen_r::ExampleEnum' and
'const enum testgen::ExampleEnum'" (peter liu via thiru)
 
+    AVRO-1823: Java: Do not swallow IOException while reading magic bytes.
+    (Koji Noguchi via blue)
+
   BUG FIXES
 
     AVRO-1493. Java: Avoid the "Turkish Locale Problem". Schema fingerprints are

http://git-wip-us.apache.org/repos/asf/avro/blob/f4f22637/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 a19762b..458a7df 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,7 +99,7 @@ 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.");
+      throw new IOException("Not a data file.", e);
     }
     if (!Arrays.equals(DataFileConstants.MAGIC, magic))
       throw new IOException("Not a data file.");


Mime
View raw message