diff options
author | aclement <aclement> | 2005-11-14 10:38:47 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-14 10:38:47 +0000 |
commit | 4b8bed7cff98b2aca5586e604a138c3674453c90 (patch) | |
tree | 0016fd8d134513859d3cc8f911e07958f72c4fd1 /weaver | |
parent | 563ab1bc7659edf2d42bed64f131b2a6df1ac56a (diff) | |
download | aspectj-4b8bed7cff98b2aca5586e604a138c3674453c90.tar.gz aspectj-4b8bed7cff98b2aca5586e604a138c3674453c90.zip |
tests and fixes for 115235: stackoverflow on concretizing pointcuts (patch from Helen)
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/Pointcut.java | 2 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/Pointcut.java b/weaver/src/org/aspectj/weaver/patterns/Pointcut.java index 64029dd29..1cf99da28 100644 --- a/weaver/src/org/aspectj/weaver/patterns/Pointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/Pointcut.java @@ -104,6 +104,8 @@ public abstract class Pointcut extends PatternNode { private FuzzyBoolean lastMatchedShadowResult; private String[] typeVariablesInScope = new String[0]; + protected boolean hasBeenParameterized = false; + /** * Constructor for Pattern. */ diff --git a/weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java b/weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java index 886e5f818..6d99ae261 100644 --- a/weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java @@ -322,7 +322,10 @@ public class ReferencePointcut extends Pointcut { newBindings.pushEnclosingDefinition(pointcutDec); try { Pointcut ret = pointcutDec.getPointcut(); - if (typeVariableMap != null) ret = ret.parameterizeWith(typeVariableMap); + if (typeVariableMap != null && !hasBeenParameterized) { + ret = ret.parameterizeWith(typeVariableMap); + ret.hasBeenParameterized=true; + } return ret.concretize(searchStart, declaringType, newBindings); } finally { newBindings.popEnclosingDefinitition(); |