OSDN Git Service

GWT Reflection: Fixed getSuperClass to return null for Object.class
authorhneuer <hanno.neuer@gmail.com>
Sat, 21 Sep 2013 12:28:43 +0000 (14:28 +0200)
committerhneuer <hanno.neuer@gmail.com>
Sat, 21 Sep 2013 12:28:43 +0000 (14:28 +0200)
backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/Type.java

index a5060bb..ec57695 100644 (file)
@@ -61,7 +61,7 @@ public class Type {
        /** @return the super class of this type or null */\r
        public Type getSuperclass () {\r
                try {\r
-                       return ReflectionCache.forName(superClass.getName());\r
+                       return superClass == null ? null : ReflectionCache.forName(superClass.getName());\r
                } catch (ClassNotFoundException e) {\r
                        return null;\r
                }\r