Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
3.10, 3.12
-
None
-
None
Description
In the constructor of org.apache.xbean.finder.archive.JarArchive. In its constructor a JarFile object is created (on line 53) and this jar never gets closed.
To reproduce the problem use the attached zip. It contains a test bundle - JarArchiveTest, the Eclipse project for it and a jar file, used by the test. The only thing that the test bundle does is to call ClasspathArchive.archive(ClassLoader, URL) in its Activator.start() method.
Steps to reproduce:
1. install and start JarArchiveTest_1.0.0.jar in an OSGi environment (it should contain at the minimum org.apache.xbean.finder.shaded and its dependencies - org.apache.xbean.asm.shaded, org.apache.xbean.bundleutils and org.slf4j.api); the dummy.jar should be in the working folder - the test bundle searches it as "./dummy.jar".
2. try to delete dummy.jar - it should not be possible
3. stop JarArchiveTest_1.0.0.jar and try to delete dummy.jar - it should not be possible
4. uninstall JarArchiveTest_1.0.0.jar and try to delete dummy.jar - it should not be possible