Skip to content

Commit

Permalink
Use JarFile.OPEN_READ instead of ZipFile
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi authored Nov 25, 2024
1 parent 7dcb378 commit 21a377c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.Manifest;
import java.util.zip.ZipFile;

/**
* A resource loader which corresponds to a JAR file.
Expand All @@ -25,7 +24,7 @@ public final class JarFileResourceLoader implements ResourceLoader {
*/
public JarFileResourceLoader(final Path jarPath) throws IOException {
this.base = jarPath.toUri().toURL();
jarFile = new JarFile(jarPath.toFile(), true, ZipFile.OPEN_READ, JarFile.runtimeVersion());
jarFile = new JarFile(jarPath.toFile(), true, JarFile.OPEN_READ, JarFile.runtimeVersion());
}

/**
Expand Down

0 comments on commit 21a377c

Please sign in to comment.