diff options
author | Andy Clement <aclement@vmware.com> | 2012-02-15 14:25:02 -0800 |
---|---|---|
committer | Andy Clement <aclement@vmware.com> | 2012-02-15 14:25:02 -0800 |
commit | 89756cdfe58319d4e8e29b88de6fd8810d84244d (patch) | |
tree | 64e1a37d47f3e81b0aa4fd0e3772ac87cb41aabc /org.aspectj.matcher | |
parent | f66393ae36fc65882be9810d0c8100aee7739521 (diff) | |
download | aspectj-89756cdfe58319d4e8e29b88de6fd8810d84244d.tar.gz aspectj-89756cdfe58319d4e8e29b88de6fd8810d84244d.zip |
371684 - wildcard generics unpacking
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java b/org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java index 19baaacb0..f22d14a0f 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/TypeFactory.java @@ -144,7 +144,7 @@ public class TypeFactory { return new UnresolvedType(signature, signatureErasure, typeParams); } // can't replace above with convertSigToType - leads to stackoverflow - } else if ((firstChar == '?' || firstChar == '*') && signature.length() == 1) { + } else if ((firstChar == '?' || firstChar == '*') && signature.length()==1) { return WildcardedUnresolvedType.QUESTIONMARK; } else if (firstChar == '+') { // ? extends ... @@ -297,6 +297,21 @@ public class TypeFactory { case '>': anglies--; break; + case '*': + if (anglies==0) { + int nextCharPos = endOfSig+1; + if (nextCharPos>=remainingToProcess.length()) { + sigFound=true; + } else { + char nextChar = remainingToProcess.charAt(nextCharPos); + if (!(nextChar=='+' || nextChar=='-')) { + // dont need to set endOfSig as the loop will increment + // it to the right place before it exits + sigFound=true; + } + } + } + break; case '[': if (anglies == 0) { // the next char might be a [ or a primitive type ref (BCDFIJSZ) |