[
https://issues.apache.org/jira/browse/XBEAN-251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lazar Kirchev updated XBEAN-251:
--------------------------------
Attachment: ResourceFinder_close_jar.patch
Proposed patch
> 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
> Attachments: ResourceFinder_close_jar.patch
>
>
> 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 was sent by Atlassian JIRA
(v6.1#6144)