From fc33d332792e3bc792b0d6ded56e3d894a1442cc Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 21 May 2007 11:54:16 +0000 Subject: [PATCH] test and fix for 172107 --- .../src/org/aspectj/weaver/bcel/BcelClassWeaver.java | 11 ++++++++--- weaver/src/org/aspectj/weaver/bcel/BcelShadow.java | 8 +++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java index 623bfb336..1acf634fb 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java @@ -2615,9 +2615,14 @@ class BcelClassWeaver implements IClassWeaver { // sets of synthetics aren't join points in 1.1 return; } else { - match( - BcelShadow.makeFieldSet(world, mg, ih, enclosingShadow), - shadowAccumulator); + // Fix for bug 172107 (similar the "get" fix for bug 109728) + BcelShadow bs= + BcelShadow.makeFieldSet(world, resolvedField, mg, ih, enclosingShadow); + String cname = fi.getClassName(cpg); + if (!resolvedField.getDeclaringType().getName().equals(cname)) { + bs.setActualTargetType(cname); + } + match(bs, shadowAccumulator); } } diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java index 883f04a54..9e67f3436 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java @@ -994,6 +994,7 @@ public class BcelShadow extends Shadow { public static BcelShadow makeFieldSet( BcelWorld world, + ResolvedMember field, LazyMethodGen enclosingMethod, InstructionHandle setHandle, BcelShadow enclosingShadow) @@ -1003,9 +1004,10 @@ public class BcelShadow extends Shadow { new BcelShadow( world, FieldSet, - BcelWorld.makeFieldJoinPointSignature( - enclosingMethod.getEnclosingClass(), - (FieldInstruction) setHandle.getInstruction()), + field, +// BcelWorld.makeFieldJoinPointSignature( +// enclosingMethod.getEnclosingClass(), +// (FieldInstruction) setHandle.getInstruction()), enclosingMethod, enclosingShadow); ShadowRange r = new ShadowRange(body); -- 2.39.5