ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1146020 - in /ant/core/trunk: CONTRIBUTORS WHATSNEW contributors.xml src/main/org/apache/tools/zip/ZipFile.java
Date Wed, 13 Jul 2011 13:44:21 GMT
Author: bodewig
Date: Wed Jul 13 13:44:20 2011
New Revision: 1146020

URL: http://svn.apache.org/viewvc?rev=1146020&view=rev
Log:
clean up Inflater instance as some JDKs won't do it for us.  PR 42696.  Submitted by Mounir

Modified:
    ant/core/trunk/CONTRIBUTORS
    ant/core/trunk/WHATSNEW
    ant/core/trunk/contributors.xml
    ant/core/trunk/src/main/org/apache/tools/zip/ZipFile.java

Modified: ant/core/trunk/CONTRIBUTORS
URL: http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?rev=1146020&r1=1146019&r2=1146020&view=diff
==============================================================================
--- ant/core/trunk/CONTRIBUTORS (original)
+++ ant/core/trunk/CONTRIBUTORS Wed Jul 13 13:44:20 2011
@@ -238,6 +238,7 @@ Miha
 Mike Davis
 Mike Roberts
 mnowostawski
+Mounir
 Nathan Beyer
 Nick Chalko
 Nick Fortescue

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=1146020&r1=1146019&r2=1146020&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed Jul 13 13:44:20 2011
@@ -55,6 +55,10 @@ Fixed bugs:
    error output stream some "Pipe broken" errors.
    Bugzilla Report 48789.
 
+ * ZipFile failed to clean up some resources which could lead to
+   OutOfMemoryException while unzipping large archives.
+   Bugzilla Report 42969.
+
 Other changes:
 --------------
 

Modified: ant/core/trunk/contributors.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?rev=1146020&r1=1146019&r2=1146020&view=diff
==============================================================================
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Wed Jul 13 13:44:20 2011
@@ -977,6 +977,9 @@
     <last>mnowostawski</last>
   </name>
   <name>
+    <last>Mounir</last>
+  </name>
+  <name>
     <first>Nathan</first>
     <last>Beyer</last>
   </name>

Modified: ant/core/trunk/src/main/org/apache/tools/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/zip/ZipFile.java?rev=1146020&r1=1146019&r2=1146020&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/zip/ZipFile.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/zip/ZipFile.java Wed Jul 13 13:44:20 2011
@@ -269,7 +269,13 @@ public class ZipFile {
                 return bis;
             case ZipEntry.DEFLATED:
                 bis.addDummy();
-                return new InflaterInputStream(bis, new Inflater(true));
+                final Inflater inflater = new Inflater(true);
+                return new InflaterInputStream(bis, inflater) {
+                    public void close() throws IOException {
+                        super.close();
+                        inflater.end();
+                    }
+                };
             default:
                 throw new ZipException("Found unsupported compression method "
                                        + ze.getMethod());



Mime
View raw message