-
Phillip Webb authored
Create a new `JarFileWrapper` class so that we can wrap and existing `JarFile` and offer a version that can be safely closed. Prior to this commit, we provided wrapper functionality in the `JarFile` class itself. Unfortunately, because we override `close` and also create a lot of wrappers this caused memory issues when running on Java 11. With Java 11 `java.util.zip.ZipFile` class uses `FinalizableResource` for any implementation that overrides `close()`. This means that any wrapper classes will not be garbage collected until the JVM finalizer thread runs. Closes gh-22991
aac367e9