HADOOP-14346. CryptoOutputStream throws IOException if stream is closed.
Contributed by Pierre Lacave
This commit is contained in:
parent
73563bc9b6
commit
40b9c30d64
|
@ -234,7 +234,9 @@ public class CryptoOutputStream extends FilterOutputStream implements
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public synchronized void flush() throws IOException {
|
public synchronized void flush() throws IOException {
|
||||||
checkStream();
|
if (closed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
encrypt();
|
encrypt();
|
||||||
super.flush();
|
super.flush();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue