]> source.dussan.org Git - aspectj.git/commitdiff
fixed NPE when no manifest in aspectjrt.jar
authorjhugunin <jhugunin>
Thu, 19 Dec 2002 18:00:38 +0000 (18:00 +0000)
committerjhugunin <jhugunin>
Thu, 19 Dec 2002 18:00:38 +0000 (18:00 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java

index ea877e9e4d171e5d950e593625b25329a1fb464f..6fa941d8273dcdbe68b934f6689e6f6d86c112d2 100644 (file)
@@ -443,7 +443,12 @@ public class AjBuildManager {
 
                                try {
                     String version = null;
-                    Attributes attr = new JarFile(p).getManifest().getAttributes("org/aspectj/lang/");
+                    Manifest manifest = new JarFile(p).getManifest();
+                    if (manifest == null) {
+                       return "no manifest found in " + p.getAbsolutePath() + 
+                                                               ", expected " + Version.text;
+                    }
+                    Attributes attr = manifest.getAttributes("org/aspectj/lang/");
                     if (null != attr) {
                         version = attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
                         if (null != version) {