HADOOP-14346. CryptoOutputStream throws IOException if stream is closed.

Contributed by Pierre Lacave

(cherry picked from commit 40b9c30d64ee1b07ade423533e627a7d4b099261)
This commit is contained in:
Steve Loughran 2017-04-27 12:19:04 +01:00
parent 793bbf216d
commit 61cda39e4e
No known key found for this signature in database
GPG Key ID: 950CC3E032B79CA2

View File

@ -252,7 +252,9 @@ public synchronized void close() throws IOException {
*/
@Override
public synchronized void flush() throws IOException {
checkStream();
if (closed) {
return;
}
encrypt();
super.flush();
}