From 7bcbb38f0147d3796cbc42a970755c1c2e965f28 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 18 Nov 2009 17:12:23 +0000 Subject: [PATCH] 294647: debug --- .../src/org/aspectj/weaver/ResolvedType.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) 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) { -- 2.39.5