diff options
author | Andy Clement <aclement@pivotal.io> | 2016-01-20 12:58:09 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2016-01-20 12:58:09 -0800 |
commit | 9be47cc3a9ead4208d6247fcc5da7216c231278a (patch) | |
tree | 9aebcfab91ed5269838ae153a8035f36ae16fcdd /weaver | |
parent | ee41a3446c1b678dfc8afe5842c17c2c96cc49dd (diff) | |
download | aspectj-9be47cc3a9ead4208d6247fcc5da7216c231278a.tar.gz aspectj-9be47cc3a9ead4208d6247fcc5da7216c231278a.zip |
Fixes for compile time overweaving
In writing a testcase for 352389 I discovered overweaving
just wasn't working for a compile time series of test steps.
This was due to a guard preventing secondary calls to
addOrReplaceAspect. Without the secondary call the crosscutting
collector for the aspect had recorded no mungers from the
original aspect because it was still using an EclipseSourceType
delegate. Later when it was using the binary BcelObjectType
delegate and mungers were available, they weren't collected
because of that missing addOrReplaceAspect call.
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java index 815becde0..5e524549e 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java @@ -503,7 +503,11 @@ public class BcelWeaver { UnwovenClassFile jc = i.next(); String name = jc.getClassName(); ResolvedType type = world.resolve(name); - if (type.isAspect() && !world.isOverWeaving()) { + // No overweaving guard. If you have one then when overweaving is on the + // addOrReplaceAspect will not be called when the aspect delegate changes from + // EclipseSourceType to BcelObjectType. This will mean the mungers + // are not picked up. + if (type.isAspect()) { needToReweaveWorld |= xcutSet.addOrReplaceAspect(type); } } |