From 6df6eb967f46d45d6cefd54a7b963a61bc3d56d7 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 13 Nov 2009 17:41:46 +0000 Subject: [PATCH] cope with a bug that will be reported elsewhere --- .../internal/compiler/lookup/EclipseFactory.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java index eb9aeadca..a8aead806 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java @@ -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); -- 2.39.5