hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [15/50] [abbrv] hadoop git commit: HADOOP-14346. CryptoOutputStream throws IOException if stream is closed. Contributed by Pierre Lacave
Date Tue, 02 May 2017 21:54:11 GMT
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 <stevel@apache.org>
Authored: Thu Apr 27 12:19:04 2017 +0100
Committer: Inigo <inigoiri@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


Mime
View raw message