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

Contributed by Pierre Lacave
This commit is contained in:
Steve Loughran 2017-04-27 12:17:20 +01:00
parent 73563bc9b6
commit 40b9c30d64
No known key found for this signature in database
GPG Key ID: 950CC3E032B79CA2
1 changed files with 3 additions and 1 deletions

View File

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