aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2012-06-15 17:42:25 -0700
committerAndy Clement <andrew.clement@gmail.com>2012-06-15 17:42:25 -0700
commita7483038e86dd39894d9b347f227eb6c3a33e09e (patch)
tree4a0b8bdfa50bb7d26814f0aff6d6f1ebca32b1de /weaver
parentba9d43ccaf2660ddc9916ea48f79a77ba60d435e (diff)
downloadaspectj-a7483038e86dd39894d9b347f227eb6c3a33e09e.tar.gz
aspectj-a7483038e86dd39894d9b347f227eb6c3a33e09e.zip
382189 and 382435
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java30
1 files changed, 7 insertions, 23 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
index ac9bacf84..2ae4ac91a 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java
@@ -1240,7 +1240,9 @@ public class BcelTypeMunger extends ConcreteTypeMunger {
boolean quitRightNow = false;
String localMethodName = unMangledInterMethod.getName();
- String localParameterSig = unMangledInterMethod.getParameterSignature();
+ String erasedSig = unMangledInterMethod.getSignatureErased(); // will be something like (LSuperB;)LFoo;
+ String localParameterSig = erasedSig.substring(0,erasedSig.lastIndexOf(')')+1);//unMangledInterMethod.getParameterSignature();
+ // getParameterSignatureErased() does not include parens, which we do need.
String localReturnTypeESig = unMangledInterMethod.getReturnType().getErasureSignature();
// Step1
@@ -1295,28 +1297,10 @@ public class BcelTypeMunger extends ConcreteTypeMunger {
InstructionFactory fact;
int pos = 0;
- LazyMethodGen bridgeMethod = makeMethodGen(clazz, theBridgeMethod); // The
- // bridge
- // method
- // in
- // this
- // type
- // will
- // have
- // the
- // same
- // signature
- // as
- // the
- // one
- // in
- // the
- // supertype
- bridgeMethod.setAccessFlags(bridgeMethod.getAccessFlags() | 0x00000040 /*
- * BRIDGE = 0x00000040
- */);
- // UnresolvedType[] newParams =
- // munger.getSignature().getParameterTypes();
+ // The bridge method in this type will have the same signature as the one in the supertype
+ LazyMethodGen bridgeMethod = makeMethodGen(clazz, theBridgeMethod);
+ bridgeMethod.setAccessFlags(bridgeMethod.getAccessFlags() | 0x00000040 /* BRIDGE = 0x00000040 */);
+ // UnresolvedType[] newParams = munger.getSignature().getParameterTypes();
Type returnType = BcelWorld.makeBcelType(theBridgeMethod.getReturnType());
body = bridgeMethod.getBody();
fact = clazz.getFactory();