summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java3
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java7
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java2
3 files changed, 10 insertions, 2 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
index 2c5e06f02..64f10059e 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java
@@ -1371,6 +1371,9 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
ReferenceType rt = (ReferenceType) onType;
ReferenceTypeDelegate rtd = rt.getDelegate();
if (rtd instanceof BcelObjectType) {
+ if (rt.isRawType()) {
+ rt = (ReferenceType)rt.getGenericType();
+ }
rt.addParent(parent);
// ((BcelObjectType) rtd).addParent(parent);
}
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;