]> source.dussan.org Git - aspectj.git/commitdiff
cope with a bug that will be reported elsewhere
authoraclement <aclement>
Fri, 13 Nov 2009 17:41:46 +0000 (17:41 +0000)
committeraclement <aclement>
Fri, 13 Nov 2009 17:41:46 +0000 (17:41 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java

index eb9aeadca3c5faabce8243935a2697ba94dfade4..a8aead806ecb3c31c7e8a378200124419888824d 100644 (file)
@@ -358,9 +358,15 @@ public class EclipseFactory {
                // Dont set any bounds here, you'll get in a recursive mess
                // TODO -- what about lower bounds??
                UnresolvedType superclassType = fromBinding(aTypeVariableBinding.superclass());
-               UnresolvedType[] superinterfaces = new UnresolvedType[aTypeVariableBinding.superInterfaces.length];
-               for (int i = 0; i < superinterfaces.length; i++) {
-                       superinterfaces[i] = fromBinding(aTypeVariableBinding.superInterfaces[i]);
+               UnresolvedType[] superinterfaces = null;
+               if (aTypeVariableBinding == null || aTypeVariableBinding.superInterfaces == null) {
+                       // sign of another bug that will be reported elsewhere
+                       superinterfaces = UnresolvedType.NONE;
+               } else {
+                       superinterfaces = new UnresolvedType[aTypeVariableBinding.superInterfaces.length];
+                       for (int i = 0; i < superinterfaces.length; i++) {
+                               superinterfaces[i] = fromBinding(aTypeVariableBinding.superInterfaces[i]);
+                       }
                }
                tv.setUpperBound(superclassType);
                tv.setAdditionalInterfaceBounds(superinterfaces);