]> source.dussan.org Git - aspectj.git/commitdiff
227401: test and fix - use correct declaring type when building tjp so getDeclaringTy...
authoraclement <aclement>
Thu, 22 May 2008 23:57:24 +0000 (23:57 +0000)
committeraclement <aclement>
Thu, 22 May 2008 23:57:24 +0000 (23:57 +0000)
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java

index 1dbb48f54ed81068b497dce154d4e46c70b4d359..6fa80c5e20237323456b595a3658e43093d34e13 100644 (file)
@@ -69,6 +69,7 @@ import org.aspectj.weaver.WeaverMessages;
 import org.aspectj.weaver.WeaverStateInfo;
 import org.aspectj.weaver.World;
 import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
+import org.aspectj.weaver.UnresolvedType.TypeKind;
 
 
 /**
@@ -1113,7 +1114,13 @@ public final class LazyClassGen {
                BcelWorld w = shadow.getWorld();
                list.append(new PUSH(getConstantPoolGen(),makeString(sig.getModifiers(w))));
                list.append(new PUSH(getConstantPoolGen(),sig.getName()));
-               list.append(new PUSH(getConstantPoolGen(),makeString(sig.getDeclaringType())));
+               // see pr227401
+               UnresolvedType dType = sig.getDeclaringType();
+               if (dType.getTypekind()==TypeKind.PARAMETERIZED || 
+                       dType.getTypekind()==TypeKind.GENERIC) {
+                       dType = sig.getDeclaringType().resolve(world).getGenericType();
+               }
+               list.append(new PUSH(getConstantPoolGen(),makeString(dType)));                  
                list.append(new PUSH(getConstantPoolGen(),makeString(sig.getReturnType())));
                list.append(fact.createInvoke(factoryType.getClassName(),
                                sig.getSignatureMakerName(),