HADOOP-14346. CryptoOutputStream throws IOException if stream is closed.
Contributed by Pierre Lacave
(cherry picked from commit 40b9c30d64
)
This commit is contained in:
parent
793bbf216d
commit
61cda39e4e
|
@ -252,7 +252,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