aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.matcher
diff options
context:
space:
mode:
authorAndy Clement <aclement@vmware.com>2012-02-15 14:25:02 -0800
committerAndy Clement <aclement@vmware.com>2012-02-15 14:25:02 -0800
commit89756cdfe58319d4e8e29b88de6fd8810d84244d (patch)
tree64e1a37d47f3e81b0aa4fd0e3772ac87cb41aabc /org.aspectj.matcher
parentf66393ae36fc65882be9810d0c8100aee7739521 (diff)
downloadaspectj-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.java17
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)