summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-30 13:02:11 +0000
committeracolyer <acolyer>2005-08-30 13:02:11 +0000
commit3fa3a93b462e19407b015082365b8b9f6b301915 (patch)
tree5232938a5c47777cd64f468b6747ee39c311fcc1 /weaver
parenta3ee66152903e1de3dce8cc30b2741dfdafb2614 (diff)
downloadaspectj-3fa3a93b462e19407b015082365b8b9f6b301915.tar.gz
aspectj-3fa3a93b462e19407b015082365b8b9f6b301915.zip
"band aid" for pr107530. This will treat the symptom but not the underlying cause...
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/ResolvedType.java12
-rw-r--r--weaver/src/org/aspectj/weaver/WeaverMessages.java1
-rw-r--r--weaver/src/org/aspectj/weaver/weaver-messages.properties1
3 files changed, 13 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/ResolvedType.java b/weaver/src/org/aspectj/weaver/ResolvedType.java
index ac30e3616..0e8ba26c7 100644
--- a/weaver/src/org/aspectj/weaver/ResolvedType.java
+++ b/weaver/src/org/aspectj/weaver/ResolvedType.java
@@ -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];
diff --git a/weaver/src/org/aspectj/weaver/WeaverMessages.java b/weaver/src/org/aspectj/weaver/WeaverMessages.java
index 689e2c7d8..b49155f49 100644
--- a/weaver/src/org/aspectj/weaver/WeaverMessages.java
+++ b/weaver/src/org/aspectj/weaver/WeaverMessages.java
@@ -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";
diff --git a/weaver/src/org/aspectj/weaver/weaver-messages.properties b/weaver/src/org/aspectj/weaver/weaver-messages.properties
index 7d8ab738e..56e94c5ae 100644
--- a/weaver/src/org/aspectj/weaver/weaver-messages.properties
+++ b/weaver/src/org/aspectj/weaver/weaver-messages.properties
@@ -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)