]> source.dussan.org Git - aspectj.git/commitdiff
Fix for preventing the use of if/target/this/args/cflow/cflowbelow in DeclareSofts.
authoraclement <aclement>
Thu, 26 Feb 2004 10:00:31 +0000 (10:00 +0000)
committeraclement <aclement>
Thu, 26 Feb 2004 10:00:31 +0000 (10:00 +0000)
(Reordered flow in creating declare soft munger and concretizing the pointcut)

weaver/src/org/aspectj/weaver/CrosscuttingMembers.java

index 0992fef8961cc9f57e9c180e833c74330150f3b3..62ba6041250ca8985faf568cd31b6d21a4ff073e 100644 (file)
@@ -108,9 +108,11 @@ public class CrosscuttingMembers {
                        declareParents.add(dp);
                } else if (declare instanceof DeclareSoft) {
                        DeclareSoft d = (DeclareSoft)declare;
-                       Pointcut concretePointcut = d.getPointcut().concretize(inAspect, 0);
+                       // Ordered so that during concretization we can check the related munger
+                       ShadowMunger m = Advice.makeSoftener(world, d.getPointcut(), d.getException(),inAspect);
+                       Pointcut concretePointcut = d.getPointcut().concretize(inAspect, 0,m);
+                       m.pointcut = concretePointcut;
                        declareSofts.add(new DeclareSoft(d.getException(), concretePointcut));
-                       ShadowMunger m = Advice.makeSoftener(world, concretePointcut, d.getException(),inAspect);
                        addConcreteShadowMunger(m);
                } else {
                        throw new RuntimeException("unimplemented");