summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2010-05-12 20:38:53 +0000
committeraclement <aclement>2010-05-12 20:38:53 +0000
commit461888cce1cfc9b2bc4c09792485e9e175be88be (patch)
treeecb3fd55320c3470bfb8df887109738302dcd788
parentd32c38fbcfb44c2c63fb7648a00723356a97360e (diff)
downloadaspectj-461888cce1cfc9b2bc4c09792485e9e175be88be.tar.gz
aspectj-461888cce1cfc9b2bc4c09792485e9e175be88be.zip
more overweaving tests and fixes: cflow
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java5
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java2
2 files changed, 6 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
index 895bcfa9b..f13d2b69e 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
@@ -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;
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index fff7bcba5..0622a5170 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -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;
}