aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2005-08-17 16:26:46 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2005-08-17 16:26:46 +0000
commita776280a9fbcba1916a5424c5b7998430beefcf5 (patch)
tree3d89dc0438f0135c73cce27f7b5d4a547da109e4 /src/main/javassist
parentf6faf5fde703853cfe3ea27a46db4b8523746d0d (diff)
downloadjavassist-a776280a9fbcba1916a5424c5b7998430beefcf5.tar.gz
javassist-a776280a9fbcba1916a5424c5b7998430beefcf5.zip
modified so that an error message is thrown if the super class of java.lang.Object is accessed.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@193 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist')
-rw-r--r--src/main/javassist/compiler/MemberResolver.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/javassist/compiler/MemberResolver.java b/src/main/javassist/compiler/MemberResolver.java
index 6abec996..fafbe22b 100644
--- a/src/main/javassist/compiler/MemberResolver.java
+++ b/src/main/javassist/compiler/MemberResolver.java
@@ -417,12 +417,13 @@ public class MemberResolver implements TokenId {
public static CtClass getSuperclass(CtClass c) throws CompileError {
try {
- return c.getSuperclass();
- }
- catch (NotFoundException e) {
- throw new CompileError("cannot find the super class of "
- + c.getName());
+ CtClass sc = c.getSuperclass();
+ if (sc != null)
+ return sc;
}
+ catch (NotFoundException e) {}
+ throw new CompileError("cannot find the super class of "
+ + c.getName());
}
public static String javaToJvmName(String classname) {