From 461888cce1cfc9b2bc4c09792485e9e175be88be Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 12 May 2010 20:38:53 +0000 Subject: [PATCH] more overweaving tests and fixes: cflow --- weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java | 5 +++++ weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.39.5