]> source.dussan.org Git - aspectj.git/commitdiff
avoid unpleasant NPE (see pr110307)
authoraclement <aclement>
Fri, 30 Sep 2005 12:56:45 +0000 (12:56 +0000)
committeraclement <aclement>
Fri, 30 Sep 2005 12:56:45 +0000 (12:56 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java

index 71c5d60853e9f84e483b4593035ebd3186787942..89099dc570276f82570bafd4861f453dfe716c1b 100644 (file)
@@ -740,9 +740,9 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
 
        private void addParent(SourceTypeBinding sourceType, ResolvedType parent) {
                ReferenceBinding parentBinding = (ReferenceBinding)factory.makeTypeBinding(parent); 
-               
+               if (parentBinding == null) return; // The parent is missing, it will be reported elsewhere.
         sourceType.rememberTypeHierarchy();
-               if (parentBinding.isClass()) {
+        if (parentBinding.isClass()) {
                        sourceType.superclass = parentBinding;
                        
             // this used to be true, but I think I've fixed it now, decp is done at weave time!