aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--weaver/src/org/aspectj/weaver/ResolvedType.java1
-rw-r--r--weaver/src/org/aspectj/weaver/TypeFactory.java12
2 files changed, 13 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/ResolvedType.java b/weaver/src/org/aspectj/weaver/ResolvedType.java
index 51d962d9d..34a7b05e2 100644
--- a/weaver/src/org/aspectj/weaver/ResolvedType.java
+++ b/weaver/src/org/aspectj/weaver/ResolvedType.java
@@ -838,6 +838,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl
super(signature, null);
this.size = size;
this.index = index;
+ this.typeKind=TypeKind.PRIMITIVE;
}
public final int getSize() {
return size;
diff --git a/weaver/src/org/aspectj/weaver/TypeFactory.java b/weaver/src/org/aspectj/weaver/TypeFactory.java
index eb6350b33..c90672bd3 100644
--- a/weaver/src/org/aspectj/weaver/TypeFactory.java
+++ b/weaver/src/org/aspectj/weaver/TypeFactory.java
@@ -116,6 +116,18 @@ public class TypeFactory {
UnresolvedType componentType = createTypeFromSignature(signature.substring(dims));
return new UnresolvedType(signature,
signature.substring(0,dims)+componentType.getErasureSignature());
+ } else if (signature.length()==1) { // could be a primitive
+ switch (signature.charAt(0)) {
+ case 'V': return ResolvedType.VOID;
+ case 'Z': return ResolvedType.BOOLEAN;
+ case 'B': return ResolvedType.BYTE;
+ case 'C': return ResolvedType.CHAR;
+ case 'D': return ResolvedType.DOUBLE;
+ case 'F': return ResolvedType.FLOAT;
+ case 'I': return ResolvedType.INT;
+ case 'J': return ResolvedType.LONG;
+ case 'S': return ResolvedType.SHORT;
+ }
}
return new UnresolvedType(signature);
}