]> source.dussan.org Git - aspectj.git/commitdiff
"band aid" for pr107530. This will treat the symptom but not the underlying cause...
authoracolyer <acolyer>
Tue, 30 Aug 2005 13:02:11 +0000 (13:02 +0000)
committeracolyer <acolyer>
Tue, 30 Aug 2005 13:02:11 +0000 (13:02 +0000)
weaver/src/org/aspectj/weaver/ResolvedType.java
weaver/src/org/aspectj/weaver/WeaverMessages.java
weaver/src/org/aspectj/weaver/weaver-messages.properties

index ac30e3616f50abbd72eeadd662e49a998360afef..0e8ba26c7c4939aa1df56f775a64c97e885c3152 100644 (file)
@@ -254,7 +254,17 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl
                                } 
                        }
       }
-      if (!rtx.equals(ResolvedType.OBJECT)) addAndRecurse(knowninterfaces,collector,rtx.getSuperclass(),includeITDs); // Recurse if we aren't at the top
+      if (!rtx.equals(ResolvedType.OBJECT)) {
+         ResolvedType superType = rtx.getSuperclass();
+         if (rtx == null || rtx == ResolvedType.MISSING) {
+                 // can't find type message - with context!
+                 world.showMessage(Message.ERROR,
+                                       WeaverMessages.format(WeaverMessages.CANT_FIND_PARENT_TYPE,rtx.getSignature()),
+                                       null,null);
+         } else {
+                 addAndRecurse(knowninterfaces,collector,superType,includeITDs); // Recurse if we aren't at the top
+         }
+      }
       ResolvedType[] interfaces = rtx.getDeclaredInterfaces(); // Go through the interfaces on the way back down
       for (int i = 0; i < interfaces.length; i++) {
                ResolvedType iface = interfaces[i];
index 689e2c7d8f70731216e10ec84de6c9f99037b00f..b49155f4976bffdf7058529222c5f58889bece7c 100644 (file)
@@ -79,6 +79,7 @@ public class WeaverMessages {
     public static final String CANT_FIND_TYPE_DURING_AROUND_WEAVE_PREINIT = "cftDuringAroundWeavePreinit";
     public static final String CANT_FIND_TYPE_EXCEPTION_TYPE = "cftExceptionType";
     public static final String CANT_FIND_TYPE_ARG_TYPE = "cftArgType";
+    public static final String CANT_FIND_PARENT_TYPE = "cantFindParentType";
        
        public static final String DECP_BINARY_LIMITATION = "decpBinaryLimitation";
        public static final String OVERWRITE_JSR45 = "overwriteJSR45";
index 7d8ab738ef7b3f6259570fa2d99082d17e9b6166..56e94c5aee3977aab80441d823ab424f67bf8523 100644 (file)
@@ -82,6 +82,7 @@ cftDuringAroundWeave=Can't find type {0} whilst applying around advice
 cftDuringAroundWeavePreinit=Can't find type {0} whilst applying around advice to preinitialization join point
 cftExceptionType=Can't find exception type {0} whilst processing advice
 cftArgType=Can't find type {0} whilst processing args() pcd
+cantFindParentType=can''t find supertype of {0} whilst finding all methods in {0}
 
 # Implementation limitations...
 decpBinaryLimitation=can''t use declare parents to change superclass of binary form ''{0}'' (implementation limitation)