Fix crash in JarProcessorManager when the input jar does not have a manifest.
parent
da66abfaef
commit
782344ac59
|
@ -68,7 +68,13 @@ public class JarProcessorManager {
|
||||||
String jarProcessorHash = getJarProcessorHash();
|
String jarProcessorHash = getJarProcessorHash();
|
||||||
|
|
||||||
try (JarFile jar = new JarFile(file)) {
|
try (JarFile jar = new JarFile(file)) {
|
||||||
Attributes attributes = jar.getManifest().getMainAttributes();
|
Manifest manifest = jar.getManifest();
|
||||||
|
|
||||||
|
if (manifest == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Attributes attributes = manifest.getMainAttributes();
|
||||||
|
|
||||||
if (!jarProcessorHash.equals(attributes.getValue(JAR_PROCESSOR_HASH_ATTRIBUTE))) {
|
if (!jarProcessorHash.equals(attributes.getValue(JAR_PROCESSOR_HASH_ATTRIBUTE))) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue