mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8193682: Infinite loop in ZipOutputStream.close()
Reviewed-by: lancea, coffeys
This commit is contained in:
parent
abaa073bcb
commit
1e9ed54d36
4 changed files with 229 additions and 67 deletions
|
@ -234,9 +234,12 @@ public class DeflaterOutputStream extends FilterOutputStream {
|
|||
*/
|
||||
public void close() throws IOException {
|
||||
if (!closed) {
|
||||
finish();
|
||||
if (usesDefaultDeflater)
|
||||
def.end();
|
||||
try {
|
||||
finish();
|
||||
} finally {
|
||||
if (usesDefaultDeflater)
|
||||
def.end();
|
||||
}
|
||||
out.close();
|
||||
closed = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue