Another check against missing manifest
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Mon, 16 Jan 2017 04:08:05 +0100
changeset 198097ea0f369e18
parent 1979 0f100539ce6c
child 1982 cee8ecc45816
Another check against missing manifest
rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java
     1.1 --- a/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java	Mon Jan 16 04:04:22 2017 +0100
     1.2 +++ b/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java	Mon Jan 16 04:08:05 2017 +0100
     1.3 @@ -154,8 +154,9 @@
     1.4          JarRes jarRes = new JarRes();
     1.5  
     1.6          listJAR(jf, jarRes, resources, exported);
     1.7 -        
     1.8 -        String cp = jf.getManifest().getMainAttributes().getValue("Class-Path"); // NOI18N
     1.9 +        final Manifest manifest = jf.getManifest();
    1.10 +        final Attributes mainAttributes = manifest == null ? null : manifest.getMainAttributes();
    1.11 +        String cp = mainAttributes == null ? null : mainAttributes.getValue("Class-Path"); // NOI18N
    1.12          String[] parts = cp == null ? new String[0] : cp.split(" ");
    1.13  
    1.14          if (c == null) {