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

Contributed by Pierre Lacave

(cherry picked from commit 40b9c30d64)
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
1 changed files with 3 additions and 1 deletions

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();
}