diff options
author | jhugunin <jhugunin> | 2003-07-29 20:47:53 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-07-29 20:47:53 +0000 |
commit | aab8f36a22d0ac267dee63f4137dccdbe83d3559 (patch) | |
tree | 3b73010729e95017a5dc98a0a34f1d303283ab26 /weaver/src | |
parent | ee03a3e557204184380193807326d1131c1f2777 (diff) | |
download | aspectj-aab8f36a22d0ac267dee63f4137dccdbe83d3559.tar.gz aspectj-aab8f36a22d0ac267dee63f4137dccdbe83d3559.zip |
fix for Bugzilla Bug 40876
ClassFormatError on external subtype-qualified ref to supertype pointcut
This was an important bug that was caused by the static fields used in the implementation of cflow being placed on the wrong class. This broke the rules used for name mangling and could occasionally result in name collisions as shown here.
Diffstat (limited to 'weaver/src')
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java b/weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java index 7345ecffa..3a0a8acf2 100644 --- a/weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java +++ b/weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java @@ -135,7 +135,9 @@ public class CflowPointcut extends Pointcut { Pointcut concreteEntry; - CrosscuttingMembers xcut = bindings.getConcreteAspect().crosscuttingMembers; + ResolvedTypeX concreteAspect = bindings.getConcreteAspect(); + + CrosscuttingMembers xcut = concreteAspect.crosscuttingMembers; Collection previousCflowEntries = xcut.getCflowEntries(); entryBindings.pushEnclosingDefinition(CFLOW_MARKER); @@ -150,17 +152,18 @@ public class CflowPointcut extends Pointcut { ResolvedMember cflowField = new ResolvedMember( - Member.FIELD, inAspect, Modifier.STATIC | Modifier.PUBLIC | Modifier.FINAL, + Member.FIELD, concreteAspect, Modifier.STATIC | Modifier.PUBLIC | Modifier.FINAL, NameMangler.cflowStack(xcut), TypeX.forName(NameMangler.CFLOW_STACK_TYPE).getSignature()); + //System.out.println("adding field to: " + inAspect + " field " + cflowField); // add field and initializer to inAspect //XXX and then that info above needs to be mapped down here to help with //XXX getting the exposed state right - bindings.getConcreteAspect().crosscuttingMembers.addConcreteShadowMunger( + concreteAspect.crosscuttingMembers.addConcreteShadowMunger( Advice.makeCflowEntry(world, concreteEntry, isBelow, cflowField, freeVars.length, innerCflowEntries)); - bindings.getConcreteAspect().crosscuttingMembers.addTypeMunger( + concreteAspect.crosscuttingMembers.addTypeMunger( world.makeCflowStackFieldAdder(cflowField)); |