geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lazar Kirchev (JIRA)" <>
Subject [jira] [Updated] (XBEAN-251) org.apache.xbean.finder.ResourceFinder leaves open jar files
Date Mon, 30 Sep 2013 14:48:23 GMT


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:
>             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

View raw message