diff options
author | Andy Clement <aclement@pivotal.io> | 2016-05-12 15:29:07 -0700 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2016-05-12 15:29:07 -0700 |
commit | 784906d2ee0cb1b432a9aff6973c12cfd865db6e (patch) | |
tree | d4b11d34c4dd5b12b690ac513d437685b16d9bf4 /org.aspectj.matcher/src | |
parent | d8ccdb732982e855a9d1a17c844a9d85a3a82866 (diff) | |
download | aspectj-784906d2ee0cb1b432a9aff6973c12cfd865db6e.tar.gz aspectj-784906d2ee0cb1b432a9aff6973c12cfd865db6e.zip |
Code polishing and extra diagnostics around types and parameterized types
Diffstat (limited to 'org.aspectj.matcher/src')
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java | 3 | ||||
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/World.java | 11 |
2 files changed, 7 insertions, 7 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java b/org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java index 204418346..e565e5bc8 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java @@ -28,10 +28,9 @@ public class TypeFactory { public static ReferenceType createParameterizedType(ResolvedType aBaseType, UnresolvedType[] someTypeParameters, World inAWorld) { ResolvedType baseType = aBaseType; if (!aBaseType.isGenericType()) { - // try and find the generic type... if (someTypeParameters != null && someTypeParameters.length > 0) { if (!aBaseType.isRawType()) { - throw new IllegalStateException("Expecting raw type, not: " + aBaseType); + throw new IllegalStateException("Expecting raw type, but " + aBaseType+" is of type "+aBaseType.getTypekind()); } baseType = baseType.getGenericType(); if (baseType == null) { diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java index 329fef88d..31b978028 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java @@ -1237,11 +1237,12 @@ public abstract class World implements Dump.INode { } // TODO should this be in as a permanent assertion? - /* - * if ((type instanceof ReferenceType) && type.getWorld().isInJava5Mode() && (((ReferenceType) type).getDelegate() != - * null) && type.isGenericType()) { throw new BCException("Attempt to add generic type to typemap " + type.toString() + - * " (should be raw)"); } - */ + + if ((type instanceof ReferenceType) && type.getWorld().isInJava5Mode() + && (((ReferenceType) type).getDelegate() != null) && type.isGenericType()) { + throw new BCException("Attempt to add generic type to typemap " + type.toString() + " (should be raw)"); + } + if (w.isExpendable(type)) { if (useExpendableMap) { |