You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by in...@apache.org on 2017/05/02 21:54:11 UTC

[15/50] [abbrv] hadoop git commit: HADOOP-14346. CryptoOutputStream throws IOException if stream is closed. Contributed by Pierre Lacave

HADOOP-14346. CryptoOutputStream throws IOException if stream is closed.
Contributed by Pierre Lacave

(cherry picked from commit 40b9c30d64ee1b07ade423533e627a7d4b099261)


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

Branch: refs/heads/HDFS-10467
Commit: c45a71b7c52a11d9de5f10d8c46fc226d31cee45
Parents: 86562bd
Author: Steve Loughran <st...@apache.org>
Authored: Thu Apr 27 12:19:04 2017 +0100
Committer: Inigo <in...@apache.org>
Committed: Tue May 2 14:52:03 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/crypto/CryptoOutputStream.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c45a71b7/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
index a771d96..d2f146a 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java
@@ -252,7 +252,9 @@ public class CryptoOutputStream extends FilterOutputStream implements
    */
   @Override
   public synchronized void flush() throws IOException {
-    checkStream();
+    if (closed) {
+      return;
+    }
     encrypt();
     super.flush();
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org