From: aclement Date: Thu, 11 Feb 2010 21:34:12 +0000 (+0000) Subject: 302460: debug X-Git-Tag: V1_6_9M1~59 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3b9285c9db992870541409b80f069acf82ad50ab;p=aspectj.git 302460: debug --- diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index 2f1c8d2d8..5a455e75b 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -909,6 +909,24 @@ public class BcelTypeMunger extends ConcreteTypeMunger { // out that it was the top most implementor (see pr49657) if (!classGen.getType().isTopmostImplementor(onType)) { ResolvedType rtx = classGen.getType().getTopmostImplementor(onType); + if (rtx == null) { + // pr302460 + // null means there is something wrong with what we are looking at + ResolvedType rt = classGen.getType(); + if (rt.isInterface()) { + ISourceLocation sloc = munger.getSourceLocation(); + classWeaver.getWorld().getMessageHandler().handleMessage( + MessageUtil.error("ITD target " + rt.getName() + + " is an interface but has been incorrectly determined to be the topmost implementor of " + + onType.getName() + ". ITD is " + this.getSignature(), sloc)); + } + if (!onType.isAssignableFrom(rt)) { + ISourceLocation sloc = munger.getSourceLocation(); + classWeaver.getWorld().getMessageHandler().handleMessage( + MessageUtil.error("ITD target " + rt.getName() + " doesn't appear to implement " + onType.getName() + + " why did we consider it the top most implementor? ITD is " + this.getSignature(), sloc)); + } + } if (!rtx.isExposedToWeaver()) { ISourceLocation sLoc = munger.getSourceLocation(); classWeaver.getWorld().getMessageHandler().handleMessage(