From 6fcb04c1780ac3dca5b986f1bcd558fffccb3eb9 Mon Sep 17 00:00:00 2001 From: Mingliang Liu Date: Mon, 29 Aug 2016 13:04:28 -0700 Subject: [PATCH] HADOOP-13559. Remove close() within try-with-resources in ChecksumFileSystem/ChecksumFs classes. (Contributed by Aaron Fabbri) --- .../src/main/java/org/apache/hadoop/fs/ChecksumFileSystem.java | 1 - .../src/main/java/org/apache/hadoop/fs/ChecksumFs.java | 1 - 2 files changed, 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFileSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFileSystem.java index e4c0b3309b..e0ce327a0f 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFileSystem.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFileSystem.java @@ -197,7 +197,6 @@ public int read(long position, byte[] b, int off, int len) new ChecksumFSInputChecker(fs, file)) { checker.seek(position); nread = checker.read(b, off, len); - checker.close(); } return nread; } diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java index 6e98db5b3b..397203368e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/ChecksumFs.java @@ -179,7 +179,6 @@ public int read(long position, byte[] b, int off, int len) new ChecksumFSInputChecker(fs, file)) { checker.seek(position); nread = checker.read(b, off, len); - checker.close(); } return nread; }