From d25f4c40213afd5342ccfb444b37b22523a46be2 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 3 Aug 2011 13:40:35 +0000 Subject: [PATCH] finalize deflater instance in ZipOutputStream. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1153485 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 1 + src/main/org/apache/tools/zip/ZipOutputStream.java | 1 + 2 files changed, 2 insertions(+) diff --git a/WHATSNEW b/WHATSNEW index 6ccdfc706..b4c78519e 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -57,6 +57,7 @@ Fixed bugs: * ZipFile failed to clean up some resources which could lead to OutOfMemoryException while unzipping large archives. + A similar problem in ZipArchiveOutputStream has been fixed as well. Bugzilla Report 42969. * quiet attribute added to the copy and move tasks, to be used together diff --git a/src/main/org/apache/tools/zip/ZipOutputStream.java b/src/main/org/apache/tools/zip/ZipOutputStream.java index c9e3125fa..c1d73b3df 100644 --- a/src/main/org/apache/tools/zip/ZipOutputStream.java +++ b/src/main/org/apache/tools/zip/ZipOutputStream.java @@ -409,6 +409,7 @@ public class ZipOutputStream extends FilterOutputStream { writeCentralDirectoryEnd(); offsets.clear(); entries.clear(); + def.end(); } /**