Prevent NPE if MANIFEST doesn't exist in Main
@@ -154,6 +154,7 @@ public class Main {
for (URL url : urls) {
try (JarFile jarFile = new JarFile(url.toURI().getPath())) {
Manifest manifest = jarFile.getManifest();
+ if (manifest != null) {
String embeddedArtifacts = manifest.getMainAttributes().getValue(JarInJarConstants.REDIRECTED_CLASS_PATH_MANIFEST_NAME);
if (embeddedArtifacts != null) {
String[] artifacts = embeddedArtifacts.split(",");
@@ -166,6 +167,7 @@ public class Main {
}
}
}
+ }
return result;
}
