Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-251

org.apache.xbean.finder.ResourceFinder leaves open jar files

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.12
    • None
    • finder
    • None

    Description

      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.

      Attachments

        1. ResourceFinder_close_jar.patch
          3 kB
          Lazar Kirchev

        Activity

          People

            Unassigned Unassigned
            lkirchev Lazar Kirchev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: