From 81ff93b04f951758de1a959a55d486fbe8fe410f Mon Sep 17 00:00:00 2001 From: aclement Date: Sun, 8 Jun 2008 21:36:27 +0000 Subject: [PATCH] test and fix for 226201 - convert return type of generic advice to parameterized type --- weaver/src/org/aspectj/weaver/bcel/BcelShadow.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java index 4cb961bc2..008d14119 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java @@ -3035,10 +3035,18 @@ public class BcelShadow extends Shadow { stateRTX); } } else { + // pr226201 + Member mungerSignature = munger.getSignature(); + if (munger.getSignature() instanceof ResolvedMember) { + if (((ResolvedMember)mungerSignature).hasBackingGenericMember()) { + mungerSignature = ((ResolvedMember)mungerSignature).getBackingGenericMember(); + } + } + UnresolvedType returnType = mungerSignature.getReturnType(); returnConversionCode = Utility.createConversion( getFactory(), - BcelWorld.makeBcelType(munger.getSignature().getReturnType()), + BcelWorld.makeBcelType(returnType), callbackMethod.getReturnType(),world.isInJava5Mode()); if (!isFallsThrough()) { returnConversionCode.append( -- 2.39.5