diff options
author | Andy Clement <andrew.clement@gmail.com> | 2012-08-27 10:34:20 -0700 |
---|---|---|
committer | Andy Clement <andrew.clement@gmail.com> | 2012-08-27 10:34:20 -0700 |
commit | 63684e55e0fbad7087b8991aea9286c2695a065b (patch) | |
tree | 55f06e7affe5bfb9db5b03e00de30d279b10fe24 /weaver | |
parent | 77d14748c35ced62f5c14f34389cb2bc942c410f (diff) | |
download | aspectj-63684e55e0fbad7087b8991aea9286c2695a065b.tar.gz aspectj-63684e55e0fbad7087b8991aea9286c2695a065b.zip |
386888: ensure annotation added
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index d65e03787..adc1e8a84 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -1931,6 +1931,17 @@ public class BcelTypeMunger extends ConcreteTypeMunger { fg.addAnnotation(ag); } } + + if (weaver.getWorld().isInJava5Mode()) { + String basicSignature = field.getSignature(); + String genericSignature = field.getReturnType().resolve(weaver.getWorld()).getSignatureForAttribute(); + // String genericSignature = + // ((ResolvedMemberImpl)field).getSignatureForAttribute(); + if (!basicSignature.equals(genericSignature)) { + // Add a signature attribute to it + fg.addAttribute(createSignatureAttribute(gen.getConstantPool(), genericSignature)); + } + } gen.addField(fg, getSourceLocation()); } // this uses a shadow munger to add init method to constructors |