diff options
author | jhugunin <jhugunin> | 2002-12-19 18:00:38 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2002-12-19 18:00:38 +0000 |
commit | eb30dcd9e8092d32b51b21bd7fb3ddb92b71a522 (patch) | |
tree | 812cf940be0549115f1937718b52924b518f539c | |
parent | 203859ccdd8da5830ea6c454de50e78787cfff80 (diff) | |
download | aspectj-eb30dcd9e8092d32b51b21bd7fb3ddb92b71a522.tar.gz aspectj-eb30dcd9e8092d32b51b21bd7fb3ddb92b71a522.zip |
fixed NPE when no manifest in aspectjrt.jar
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java index ea877e9e4..6fa941d82 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java @@ -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) { |