hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinayakum...@apache.org
Subject 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 07:18:38 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 83926b3c5 -> 1e097ba42


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

(cherry picked from commit dff95f7af899a4f2add791afbd20c8a1e33c7a36)


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

Branch: refs/heads/branch-2
Commit: 1e097ba429037bc51c434416cadb357929a3e485
Parents: 83926b3
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:47:41 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/1e097ba4/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 c899c42..dbd17a4 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -206,6 +206,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/1e097ba4/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 f7d3e52..4d56a4e 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
@@ -2035,10 +2035,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