aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2008-05-22 23:57:24 +0000
committeraclement <aclement>2008-05-22 23:57:24 +0000
commitce470b7a64ce9f1daedd8f1843d08ab53a501d63 (patch)
tree4786a1c4541eaf95ce39d76346d789ffc63cebe6
parent5e3e0b6a07c1a1e270786faf72e6a7a54972f821 (diff)
downloadaspectj-ce470b7a64ce9f1daedd8f1843d08ab53a501d63.tar.gz
aspectj-ce470b7a64ce9f1daedd8f1843d08ab53a501d63.zip
227401: test and fix - use correct declaring type when building tjp so getDeclaringType() works at runtime
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
index 1dbb48f54..6fa80c5e2 100644
--- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
+++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
@@ -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(),