Skip to content

Commit

Permalink
aligned nar class loader
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolopaganin committed May 20, 2020
1 parent 8879a44 commit 743f64b
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ public class NarClassLoader extends URLClassLoader {

public static NarClassLoader getFromArchive(File narPath, Set<String> additionalJars,
String narExtractionDirectory) throws IOException {
File unpacked = NarUnpacker.unpackNar(narPath, getNarExtractionDirectory(narExtractionDirectory));
try {
return new NarClassLoader(unpacked, additionalJars, NarClassLoader.class.getClassLoader());
} catch (ClassNotFoundException | NoClassDefFoundError e) {
throw new IOException(e);
}
return NarClassLoader.getFromArchive(narPath, additionalJars, NarClassLoader.class.getClassLoader(),
NarClassLoader.DEFAULT_NAR_EXTRACTION_DIR);
}

public static NarClassLoader getFromArchive(File narPath, Set<String> additionalJars) throws IOException {
return NarClassLoader.getFromArchive(narPath, additionalJars, NarClassLoader.DEFAULT_NAR_EXTRACTION_DIR);
}

public static NarClassLoader getFromArchive(File narPath, Set<String> additionalJars, ClassLoader parent,
Expand Down

0 comments on commit 743f64b

Please sign in to comment.