]> source.dussan.org Git - aspectj.git/commitdiff
294647: debug
authoraclement <aclement>
Wed, 18 Nov 2009 17:12:23 +0000 (17:12 +0000)
committeraclement <aclement>
Wed, 18 Nov 2009 17:12:23 +0000 (17:12 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java

index 67e38a8d9420a24d3f962ae6de88de40fed134e3..b6db71f0445f9d2322497b27d360a4b23ac46021 100644 (file)
@@ -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) {