diff options
author | Andy Clement <andrew.clement@gmail.com> | 2012-04-05 20:53:07 -0700 |
---|---|---|
committer | Andy Clement <andrew.clement@gmail.com> | 2012-04-05 20:53:07 -0700 |
commit | 6e1704d3e20367a0b3327a7544417d5a3291ac27 (patch) | |
tree | ff07ac71f7586494ce5ec105c435381397f36843 /org.aspectj.matcher | |
parent | f41062267162351ad1e213ab86057a3d3863bc91 (diff) | |
download | aspectj-6e1704d3e20367a0b3327a7544417d5a3291ac27.tar.gz aspectj-6e1704d3e20367a0b3327a7544417d5a3291ac27.zip |
375777
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java | 7 | ||||
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java | 2 |
2 files changed, 7 insertions, 2 deletions
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<ResolvedType>(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; |