Lazar Kirchev created XBEAN-251:
-----------------------------------

             Summary: org.apache.xbean.finder.ResourceFinder leaves open jar 
files
                 Key: XBEAN-251
                 URL: https://issues.apache.org/jira/browse/XBEAN-251
             Project: XBean
          Issue Type: Bug
          Components: finder
    Affects Versions: 3.12
            Reporter: Lazar Kirchev


On line 863, in the method readJarEntries(), the getJarFile() method is called 
on a JarURLConnection object and the resulting JarFile is assigned to the 
jarfile variable. This JarFile does never get closed in the method so it stays 
open.

On line 969, in the method findResource() a JarFile object is taken from a 
JarURLConnection and assigned to the variable jarFile. Then on line 978 another 
JarFile object is assigned to the jarFile variable. Although on line 1005 
jarFile.close() is called in a finally block, this closes the second jar file, 
assigned to the jarFile variable on line 978. The jar file, assigned to the 
variable on line 969 never gets closed and stays open.

The above to cases lead to files, which cannot be removed.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to