[kaffe] Unexpected NullPointerException

Ito Kazumitsu kaz at maczuka.gcd.org
Thu Aug 9 00:25:52 PDT 2007


Please tackle the bug: http://www.kaffe.org/cgi-bin/bugzilla/show_bug.cgi?id=100

In short, Class.forName(x).toString() or Class.forName(x).hashCode()
throws an unexpected NullPointerException, where x is one of the following:

    java.lang.reflect.AnnotatedElement
    java.lang.reflect.GenericDeclaration
    java.lang.reflect.Type

all of which are interfaces belonging to the package java.lang.reflect,
and java.lang.Class implements.

The NullPointerException seems to be thrown not from a Java class
such as java.lang.Class but from a native part of Kaffe. 

This bug will appear if you run rhino on Kaffe:

Rhino 1.6 release 5 2006 11 18
js> cl = java.lang.Class.forName("AnyClass");
java.lang.NullPointerException
   at java.lang.Class$MethodKey.<init> (Class.java:652)
   at java.lang.Class.internalGetMethods (Class.java:846)
   at java.lang.Class.getMethods (Class.java:815)
   ...




More information about the kaffe mailing list