From f07508934e02405e2645d99bd094a61d90cf2bea Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 26 Oct 2005 16:51:22 +0000 Subject: see pr112105 comment #13: naughty. made a check configurable. --- weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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(); -- cgit v1.2.3