diff options
author | aclement <aclement> | 2011-07-18 20:44:33 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-07-18 20:44:33 +0000 |
commit | 8553b30c9211a49b225e6c6bc81abda849263740 (patch) | |
tree | 20a888ea6cc79e8a727270eb1b786bf068517ad1 | |
parent | 01f1141b8257a6b15817c3153ed2eb7ef38c6445 (diff) | |
download | aspectj-8553b30c9211a49b225e6c6bc81abda849263740.tar.gz aspectj-8553b30c9211a49b225e6c6bc81abda849263740.zip |
352389: fix
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java index 784e1c3f5..fcebfc2a5 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java @@ -53,6 +53,7 @@ import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.SourceLocation; import org.aspectj.weaver.AjAttribute; +import org.aspectj.weaver.AjAttribute.WeaverState; import org.aspectj.weaver.AjAttribute.WeaverVersionInfo; import org.aspectj.weaver.BCException; import org.aspectj.weaver.Member; @@ -459,8 +460,11 @@ public final class LazyClassGen { myGen.addAttribute(Utility.bcelAttribute(new AjAttribute.WeaverVersionInfo(), getConstantPool())); } - if (myType != null && myType.getWeaverState() != null) { - myGen.addAttribute(Utility.bcelAttribute(new AjAttribute.WeaverState(myType.getWeaverState()), getConstantPool())); + // 352389: don't add another one (there will already be one there and this new one won't deserialize correctly) + if (!world.isOverWeaving() || !myGen.hasAttribute(WeaverState.AttributeName)) { + if (myType != null && myType.getWeaverState() != null) { + myGen.addAttribute(Utility.bcelAttribute(new AjAttribute.WeaverState(myType.getWeaverState()), getConstantPool())); + } } // FIXME ATAJ needed only for slow Aspects.aspectOf() - keep or remove |