From 6e1704d3e20367a0b3327a7544417d5a3291ac27 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Thu, 5 Apr 2012 20:53:07 -0700 Subject: 375777 --- org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java | 7 ++++++- org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'org.aspectj.matcher') diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java index 6c9d6e98b..53f3f72a4 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java @@ -993,7 +993,7 @@ public class ReferenceType extends ResolvedType { } @Override - public ResolvedType getGenericType() { + public ReferenceType getGenericType() { if (isGenericType()) { return this; } @@ -1053,6 +1053,11 @@ public class ReferenceType extends ResolvedType { @Override public void addParent(ResolvedType newParent) { + if (this.isRawType()) { + throw new IllegalStateException( + "The raw type should never be accumulating new interfaces, they should be on the generic type. Type is " + + this.getName()); + } if (newParent.isClass()) { newSuperclass = newParent; superclassReference = new WeakReference(null); diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index 6cf414466..0659dfc1e 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -2383,7 +2383,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl * * @return */ - public ResolvedType getGenericType() { + public ReferenceType getGenericType() { // if (!(isParameterizedType() || isRawType())) // throw new BCException("The type " + getBaseName() + " is not parameterized or raw - it has no generic type"); return null; -- cgit v1.2.3