]> source.dussan.org Git - javassist.git/commitdiff
modified so that an error message is thrown if the super class of java.lang.Object...
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Wed, 17 Aug 2005 16:26:46 +0000 (16:26 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Wed, 17 Aug 2005 16:26:46 +0000 (16:26 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@193 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/compiler/MemberResolver.java

index 6abec996d5df251eaa0e045e1bb43d180860319c..fafbe22b41d5f1ca8e21767028f7a2fd001e1c3b 100644 (file)
@@ -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) {