From: aclement Date: Wed, 12 May 2010 20:38:53 +0000 (+0000) Subject: more overweaving tests and fixes: cflow X-Git-Tag: V1_6_9M2~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=461888cce1cfc9b2bc4c09792485e9e175be88be;p=aspectj.git more overweaving tests and fixes: cflow --- 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; }