Nicolas Geoffray wrote:
there is something that might be wrong in the implementation of
VMObjectStreamClass.hasClassInitializer
(native/jni/java-io/java_io_VMObjectStreamClass.c). It uses
GetStaticMethodID and tests if an exception occured to see if the clinit
method exists.
The thing is, in the spec, GetStaticMethodID has to clinit the class.
Imagine there is a clinit and the clinit raises and exception, the
result of hasClassInitializer would be false.
How about this: add this line to ObjectStreamClass before calling
VMObjectStreamClass.hasClassInitializer to force class initialization
ahead of time:
Class.forName(cl.getName(), true, cl.getClassLoader());
Then we'll know that any exception thrown in the JNI code is
not an initializer exception.
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix * http://www.awarix.com
_______________________________________________
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath