فهرست منبع

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

Steve Loughran 8 سال پیش
والد
کامیت
40b9c30d64

+ 3 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoOutputStream.java

@@ -234,7 +234,9 @@ public class CryptoOutputStream extends FilterOutputStream implements
    */
   @Override
   public synchronized void flush() throws IOException {
-    checkStream();
+    if (closed) {
+      return;
+    }
     encrypt();
     super.flush();
   }