summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2007-05-21 11:54:16 +0000
committeraclement <aclement>2007-05-21 11:54:16 +0000
commitfc33d332792e3bc792b0d6ded56e3d894a1442cc (patch)
treec30862c14b41a36f0d89b93dbfffa710d66b2361 /weaver
parent2f71a4085231169ab07d54c2c6cc453a3c0027bf (diff)
downloadaspectj-fc33d332792e3bc792b0d6ded56e3d894a1442cc.tar.gz
aspectj-fc33d332792e3bc792b0d6ded56e3d894a1442cc.zip
test and fix for 172107
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java11
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelShadow.java8
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);