diff options
author | aclement <aclement> | 2011-03-28 19:37:01 +0000 |
---|---|---|
committer | aclement <aclement> | 2011-03-28 19:37:01 +0000 |
commit | a8e6797a9268d9fb041c075ee7701831f7e848b4 (patch) | |
tree | 302837835adc81ecae76c1a50c866846a5bc104d /weaver | |
parent | f7a44908e788419368618c6ad6c491b6e34dc0c3 (diff) | |
download | aspectj-a8e6797a9268d9fb041c075ee7701831f7e848b4.tar.gz aspectj-a8e6797a9268d9fb041c075ee7701831f7e848b4.zip |
340323
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index 3e2fd59b3..222a4f2d1 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -1246,18 +1246,20 @@ public class BcelTypeMunger extends ConcreteTypeMunger { // Step2 if (!alreadyDone) { - // Use the iterator form of 'getMethods()' so we do as little work - // as necessary - for (Iterator<ResolvedMember> iter = onType.getSuperclass().getMethods(true, true); iter.hasNext() && !quitRightNow;) { - ResolvedMember aMethod = iter.next(); - if (aMethod.getName().equals(localMethodName) && aMethod.getParameterSignature().equals(localParameterSig)) { - // check the return types, if they are different we need a - // bridging method. - if (!aMethod.getReturnType().getErasureSignature().equals(localReturnTypeESig) - && !Modifier.isPrivate(aMethod.getModifiers())) { - // Step3 - createBridgeMethod(weaver.getWorld(), munger, unMangledInterMethod, gen, paramTypes, aMethod); - quitRightNow = true; + // Use the iterator form of 'getMethods()' so we do as little work as necessary + ResolvedType supertype = onType.getSuperclass(); + if (supertype != null) { + for (Iterator<ResolvedMember> iter = supertype.getMethods(true, true); iter.hasNext() && !quitRightNow;) { + ResolvedMember aMethod = iter.next(); + if (aMethod.getName().equals(localMethodName) && aMethod.getParameterSignature().equals(localParameterSig)) { + // check the return types, if they are different we need a + // bridging method. + if (!aMethod.getReturnType().getErasureSignature().equals(localReturnTypeESig) + && !Modifier.isPrivate(aMethod.getModifiers())) { + // Step3 + createBridgeMethod(weaver.getWorld(), munger, unMangledInterMethod, gen, paramTypes, aMethod); + quitRightNow = true; + } } } } |