From 63684e55e0fbad7087b8991aea9286c2695a065b Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Mon, 27 Aug 2012 10:34:20 -0700 Subject: [PATCH] 386888: ensure annotation added --- .../src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- 2.39.5