diff options
Diffstat (limited to 'weaver5')
-rw-r--r-- | weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java index 9d6e99cb8..57909f6df 100644 --- a/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java +++ b/weaver5/java5-src/org/aspectj/weaver/reflect/Java15ReflectionBasedReferenceTypeDelegate.java @@ -129,9 +129,13 @@ public class Java15ReflectionBasedReferenceTypeDelegate extends return superInterfaces; } + // If the superclass is null, return Object - same as bcel does public ResolvedType getSuperclass() { - if (superclass == null && getBaseClass()!=Object.class) // superclass of Object is null - superclass = fromType(this.getBaseClass().getGenericSuperclass()); + if (superclass == null && getBaseClass()!=Object.class) {// superclass of Object is null + Type t = this.getBaseClass().getGenericSuperclass(); + if (t!=null) superclass = fromType(t); + if (t==null) superclass = getWorld().resolve(UnresolvedType.OBJECT); + } return superclass; } |