From e86050fae52807f985896205895ca87da1aed719 Mon Sep 17 00:00:00 2001 From: "Boyina, Hemanth Kumar" Date: Tue, 6 Apr 2021 18:06:10 +0530 Subject: [PATCH] HADOOP-17588. CryptoInputStream#close() should be syncronized. Contributed by RenukaPrasad C --- .../main/java/org/apache/hadoop/crypto/CryptoInputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java index 0c156e3548d..3f8dc54bd4a 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/CryptoInputStream.java @@ -317,7 +317,7 @@ public class CryptoInputStream extends FilterInputStream implements } @Override - public void close() throws IOException { + public synchronized void close() throws IOException { if (closed) { return; }