aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-11 14:59:50 +0000
committeracolyer <acolyer>2005-08-11 14:59:50 +0000
commitdcd9cf5419b304c1cd3c0646ffa57096272acf86 (patch)
tree9578376e25988f7303870f35a7d09503c4de0ede
parentc8f96a7768dba1d8c707b24c8cc15e641a9e868f (diff)
downloadaspectj-dcd9cf5419b304c1cd3c0646ffa57096272acf86.tar.gz
aspectj-dcd9cf5419b304c1cd3c0646ffa57096272acf86.zip
proper handling of type variable signatures ("Txxx;")
-rw-r--r--weaver/src/org/aspectj/weaver/TypeFactory.java6
-rw-r--r--weaver/src/org/aspectj/weaver/UnresolvedType.java4
2 files changed, 8 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/TypeFactory.java b/weaver/src/org/aspectj/weaver/TypeFactory.java
index 465747b4d..b921d0aad 100644
--- a/weaver/src/org/aspectj/weaver/TypeFactory.java
+++ b/weaver/src/org/aspectj/weaver/TypeFactory.java
@@ -104,6 +104,12 @@ public class TypeFactory {
ret.typeKind = TypeKind.WILDCARD;
ret.setLowerBound(bound);
return ret;
+ } else if (signature.startsWith("T")) {
+ String typeVariableName = signature.substring(1);
+ if (typeVariableName.endsWith(";")) {
+ typeVariableName = typeVariableName.substring(0, typeVariableName.length() -1);
+ }
+ return new UnresolvedTypeVariableReferenceType(new TypeVariable(typeVariableName));
}
return new UnresolvedType(signature);
}
diff --git a/weaver/src/org/aspectj/weaver/UnresolvedType.java b/weaver/src/org/aspectj/weaver/UnresolvedType.java
index aa657244c..eee985b29 100644
--- a/weaver/src/org/aspectj/weaver/UnresolvedType.java
+++ b/weaver/src/org/aspectj/weaver/UnresolvedType.java
@@ -421,7 +421,7 @@ public class UnresolvedType implements TypeVariableDeclaringElement {
case '+': return TypeFactory.createTypeFromSignature(signature);
case '-' : return TypeFactory.createTypeFromSignature(signature);
case '?' : return TypeFactory.createTypeFromSignature(signature);
- case 'T' : return new UnresolvedTypeVariableReferenceType(new TypeVariable(signature.substring(1)));
+ case 'T' : return TypeFactory.createTypeFromSignature(signature);
default: throw new BCException("Bad type signature " + signature);
}
}
@@ -773,7 +773,7 @@ public class UnresolvedType implements TypeVariableDeclaringElement {
}
public void write(DataOutputStream s) throws IOException {
- s.writeUTF(signature);
+ s.writeUTF(getSignature());
}
public static UnresolvedType read(DataInputStream s) throws IOException {