]> source.dussan.org Git - aspectj.git/commitdiff
test and fix for 226201 - convert return type of generic advice to parameterized...
authoraclement <aclement>
Sun, 8 Jun 2008 21:36:27 +0000 (21:36 +0000)
committeraclement <aclement>
Sun, 8 Jun 2008 21:36:27 +0000 (21:36 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java

index 4cb961bc20f270e0daccfacacd3c2b451a726f95..008d14119acada4f407b8c85b06d985bb9283435 100644 (file)
@@ -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(