]> source.dussan.org Git - aspectj.git/commitdiff
more overweaving tests and fixes: cflow
authoraclement <aclement>
Wed, 12 May 2010 20:38:53 +0000 (20:38 +0000)
committeraclement <aclement>
Wed, 12 May 2010 20:38:53 +0000 (20:38 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java

index 895bcfa9b144622f9de6bbe61e3de76f8621ac8e..f13d2b69e62b5ef34f6317d05c13062a381a0778 100644 (file)
@@ -422,6 +422,7 @@ class BcelClassWeaver implements IClassWeaver {
                        isChanged = true;
                }
 
+               WeaverStateInfo typeWeaverState = (world.isOverWeaving() ? getLazyClassGen().getType().getWeaverState() : null);
                // start by munging all typeMungers
                for (ConcreteTypeMunger o : typeMungers) {
                        if (!(o instanceof BcelTypeMunger)) {
@@ -429,6 +430,10 @@ class BcelClassWeaver implements IClassWeaver {
                                continue;
                        }
                        BcelTypeMunger munger = (BcelTypeMunger) o;
+
+                       if (typeWeaverState != null && typeWeaverState.isAspectAlreadyApplied(munger.getAspectType())) {
+                               continue;
+                       }
                        boolean typeMungerAffectedType = munger.munge(this);
                        if (typeMungerAffectedType) {
                                isChanged = true;
index fff7bcba503cc76863f0f018c612155c4d6f0148..0622a51701da13ae2c281b164916be56e640f929 100644 (file)
@@ -1997,7 +1997,7 @@ public class BcelWeaver {
                } else {
                        for (ShadowMunger munger : list) {
                                if (typeWeaverState != null) { // will only be null if overweaving is ON and there is weaverstate
-                                       ResolvedType declaringAspect = munger.getDeclaringType();
+                                       ResolvedType declaringAspect = munger.getConcreteAspect();// getDeclaringType();
                                        if (typeWeaverState.isAspectAlreadyApplied(declaringAspect)) {
                                                continue;
                                        }