From: aclement Date: Mon, 14 Nov 2005 16:08:04 +0000 (+0000) Subject: fixes for pr115788 - primitive handling. X-Git-Tag: V1_5_0RC1~192 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ccd571e8b952c0b67d15f1d30d5a19f91b7e97ef;p=aspectj.git fixes for pr115788 - primitive handling. --- 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); }