From: chiba Date: Wed, 17 Aug 2005 16:26:46 +0000 (+0000) Subject: modified so that an error message is thrown if the super class of java.lang.Object... X-Git-Tag: rel_3_17_1_ga~431 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a776280a9fbcba1916a5424c5b7998430beefcf5;p=javassist.git 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 --- 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) {