From 3b9285c9db992870541409b80f069acf82ad50ab Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 11 Feb 2010 21:34:12 +0000 Subject: [PATCH] 302460: debug --- .../aspectj/weaver/bcel/BcelTypeMunger.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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( -- 2.39.5