You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/05/22 07:35:01 UTC

DO NOT REPLY [Bug 39628] New: - [PATCH] close inputstream in Manifest getDefaultManifest() instead of relying upon finalization

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: sissonj@insession.com


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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39628] - [PATCH] close inputstream in Manifest getDefaultManifest() instead of relying upon finalization

Posted by bu...@apache.org.
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


jkf@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.7




------- Additional Comments From jkf@apache.org  2006-06-16 22:04 -------
Patch commited, thank you very much.

-- 
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39628] - [PATCH] close inputstream in Manifest getDefaultManifest() instead of relying upon finalization

Posted by bu...@apache.org.
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





------- Additional Comments From sissonj@insession.com  2006-05-22 05:36 -------
Created an attachment (id=18327)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18327&action=view)
Patch to close the InputStream in Manifest getDefaultManifest()


-- 
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org