From 0435426892c16b1b86f526ca4d4cfe62bbd3376b Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Fri, 25 May 2012 15:10:46 -0700 Subject: [PATCH] 375777 debug --- .../src/org/aspectj/weaver/ReferenceType.java | 11 ++++++++++- org.aspectj.matcher/src/org/aspectj/weaver/World.java | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java index 53f3f72a4..97e9f5fc6 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java @@ -639,7 +639,7 @@ public class ReferenceType extends ResolvedType { } ResolvedType[] delegateInterfaces = getDelegate().getDeclaredInterfaces(); if (isRawType()) { - if (newInterfaces != null) { + if (newInterfaces != null) {// debug 375777 throw new IllegalStateException( "The raw type should never be accumulating new interfaces, they should be on the generic type. Type is " + this.getName()); @@ -976,6 +976,11 @@ public class ReferenceType extends ResolvedType { if (typeKind == TypeKind.SIMPLE) { typeKind = TypeKind.RAW; signatureErasure = signature; + if (newInterfaces != null) { // debug 375777 + throw new IllegalStateException( + "Simple type promoted to raw, but simple type had new interfaces/superclass. Type is " + + this.getName()); + } } if (typeKind == TypeKind.RAW) { genericType.addDependentType(this); @@ -1131,4 +1136,8 @@ public class ReferenceType extends ResolvedType { return null; } + public boolean hasNewInterfaces() { + return newInterfaces!=null; + } + } \ No newline at end of file diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java index e56fecd7f..960b05975 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java @@ -487,6 +487,11 @@ public abstract class World implements Dump.INode { if (delegate.isGeneric() && behaveInJava5Way) { // ======== raw type =========== simpleOrRawType.typeKind = TypeKind.RAW; + if (simpleOrRawType.hasNewInterfaces()) { // debug 375777 + throw new IllegalStateException( + "Simple type promoted forced to raw, but it had new interfaces/superclass. Type is " + + simpleOrRawType.getName()); + } ReferenceType genericType = makeGenericTypeFrom(delegate, simpleOrRawType); // name = // ReferenceType.fromTypeX(UnresolvedType.forRawTypeNames( -- 2.39.5