DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39628>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39628

           Summary: [PATCH] close inputstream in Manifest
                    getDefaultManifest() instead of relying upon
                    finalization
           Product: Ant
           Version: 1.6.5
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


Currently the InputStream that is constructed inside the
org.apache.tools.ant.taskdefs.Manifest.getDefaultManifest() method is not
closed, resulting in resources only being cleaned up during finalization of the
InputStream.

For example, the InputStream and its associated inflater don't get released
until finalization:

java.util.zip.Inflater.<init>(Inflater.java:83)
java.util.zip.ZipFile.getInflater(ZipFile.java:305)
java.util.zip.ZipFile.getInputStream(ZipFile.java:250)
java.util.zip.ZipFile.getInputStream(ZipFile.java:219)
java.util.jar.JarFile.getInputStream(JarFile.java:378)
sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:119)
java.net.URL.openStream(URL.java:913)
java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:997)
java.lang.Class.getResourceAsStream(Class.java:1331)
org.apache.tools.ant.taskdefs.Manifest.getDefaultManifest(Manifest.java:702)
org.apache.tools.ant.taskdefs.Jar.createManifest(Jar.java:355)
org.apache.tools.ant.taskdefs.Jar.initZipOutputStream(Jar.java:347)
org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:476)
org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:350)

The attached patch closes the input stream.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to