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 22:05:23 UTC

[06/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/61cda39e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/61cda39e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/61cda39e

Branch: refs/heads/HDFS-10467
Commit: 61cda39e4eec00678706d96e90026455ecfc0a90
Parents: 793bbf2
Author: Steve Loughran <st...@apache.org>
Authored: Thu Apr 27 12:19:04 2017 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Thu Apr 27 12:19:04 2017 +0100

----------------------------------------------------------------------
 .../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/61cda39e/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