Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't close nested jars or wrapper when parent is closed
Update `JarFile` so that the `close()` method no longer closes nested jars or the wrapper. Prior to this commit it was possible for a parent jar file to be garbage collected and closed even though references still existed to the nested jars. When this happened the nested jars would get closed and any access to entries would result in `JarFile.ensureOpen()` throwing an `IllegalStateException`. The user would often not see this exception directly, but rather find `ClassNotFoundException` being thrown. Fixes gh-31853
- Loading branch information