From: aclement Date: Wed, 18 Nov 2009 17:12:23 +0000 (+0000) Subject: 294647: debug X-Git-Tag: V1_6_7~48 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7bcbb38f0147d3796cbc42a970755c1c2e965f28;p=aspectj.git 294647: debug --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index 67e38a8d9..b6db71f04 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -2272,21 +2272,24 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl if (existing == toAdd) { continue; } - ResolvedType pointcutDeclaringType = existing.getDeclaringType().resolve(getWorld()); - if (pointcutDeclaringType == null) { - throw new BCException("Pointcut declaring type is unexpectedly null. Pointcut is " + existing.toString()); + UnresolvedType pointcutDeclaringTypeUT = existing.getDeclaringType(); + if (pointcutDeclaringTypeUT == null) { + System.err.println("DEBUG>>> Pointcut declaring type is unexpectedly null. Pointcut is " + existing.toString()); } - if (!isVisible(existing.getModifiers(), pointcutDeclaringType, this)) { - // if they intended to override it but it is not visible, - // give them a nicer message - if (existing.isAbstract() && conflictingSignature(existing, toAdd)) { - getWorld().showMessage( - IMessage.ERROR, - WeaverMessages.format(WeaverMessages.POINTCUT_NOT_VISIBLE, existing.getDeclaringType().getName() - + "." + existing.getName() + "()", this.getName()), toAdd.getSourceLocation(), null); - j.remove(); + if (pointcutDeclaringTypeUT!=null) { + ResolvedType pointcutDeclaringType = pointcutDeclaringTypeUT.resolve(getWorld()); + if (!isVisible(existing.getModifiers(), pointcutDeclaringType, this)) { + // if they intended to override it but it is not visible, + // give them a nicer message + if (existing.isAbstract() && conflictingSignature(existing, toAdd)) { + getWorld().showMessage( + IMessage.ERROR, + WeaverMessages.format(WeaverMessages.POINTCUT_NOT_VISIBLE, existing.getDeclaringType().getName() + + "." + existing.getName() + "()", this.getName()), toAdd.getSourceLocation(), null); + j.remove(); + } + continue; } - continue; } if (conflictingSignature(existing, toAdd)) { if (isOverriding) {