summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2005-10-26 16:51:22 +0000
committeraclement <aclement>2005-10-26 16:51:22 +0000
commitf07508934e02405e2645d99bd094a61d90cf2bea (patch)
tree6fee1b5f9877609e77bbfeaf8f9d98dd8dc31db7
parent8287abe6bd065542825c32a427ad357b95d7d0dc (diff)
downloadaspectj-f07508934e02405e2645d99bd094a61d90cf2bea.tar.gz
aspectj-f07508934e02405e2645d99bd094a61d90cf2bea.zip
see pr112105 comment #13: naughty. made a check configurable.
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
index 647090eeb..6a29148c7 100644
--- a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
@@ -90,6 +90,9 @@ public class WildTypePattern extends TypePattern {
String[] knownMatches;
int dim;
+ // SECRETAPI - just for testing, turns off boundschecking temporarily...
+ public static boolean boundscheckingoff = false;
+
// these next three are set if the type pattern is constrained by extends or super clauses, in which case the
// namePatterns must have length 1
// TODO AMC: read/write/resolve of these fields
@@ -896,6 +899,15 @@ public class WildTypePattern extends TypePattern {
// now check that each typeParameter pattern, if exact, matches the bounds
// of the type variable.
+ return checkBoundsOK(scope,genericType,requireExactType);
+
+ // return true;
+ }
+
+ public boolean checkBoundsOK(IScope scope,ResolvedType genericType,boolean requireExactType) {
+ if (boundscheckingoff) return true;
+ TypeVariable[] tvs = genericType.getTypeVariables();
+ TypePattern[] typeParamPatterns = typeParameters.getTypePatterns();
if (typeParameters.areAllExactWithNoSubtypesAllowed()) {
for (int i = 0; i < tvs.length; i++) {
UnresolvedType ut = typeParamPatterns[i].getExactType();