hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [1/8] git commit: HADOOP-11101. How about inputstream close statement from catch block to finally block in FileContext#copy() ( Contributed by skrho )
Date Thu, 25 Sep 2014 18:14:59 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-6581 e8e7fbe81 -> 364e60b16


HADOOP-11101. How about inputstream close statement from catch block to finally block in FileContext#copy()
( Contributed by skrho )


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

Branch: refs/heads/HDFS-6581
Commit: dff95f7af899a4f2add791afbd20c8a1e33c7a36
Parents: 428a766
Author: Vinayakumar B <vinayakumarb@apache.org>
Authored: Thu Sep 25 12:46:47 2014 +0530
Committer: Vinayakumar B <vinayakumarb@apache.org>
Committed: Thu Sep 25 12:46:47 2014 +0530

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                   | 3 +++
 .../src/main/java/org/apache/hadoop/fs/FileContext.java           | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/dff95f7a/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index a4b3314..7bc77dd 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -545,6 +545,9 @@ Release 2.6.0 - UNRELEASED
 
     HADOOP-11009. Add Timestamp Preservation to DistCp (Gary Steelman via aw)
 
+    HADOOP-11101. How about inputstream close statement from catch block to
+    finally block in FileContext#copy() ( skrho via vinayakumarb )
+
   OPTIMIZATIONS
 
     HADOOP-10838. Byte array native checksumming. (James Thomas via todd)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dff95f7a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
index c9c8fa8..d878d17 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileContext.java
@@ -2021,10 +2021,9 @@ public final class FileContext {
                 EnumSet.of(CreateFlag.CREATE);
           out = create(qDst, createFlag);
           IOUtils.copyBytes(in, out, conf, true);
-        } catch (IOException e) {
+        } finally {
           IOUtils.closeStream(out);
           IOUtils.closeStream(in);
-          throw e;
         }
       }
       if (deleteSource) {


Mime
View raw message