[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hasClassInitializer and exception

From: Nicolas Geoffray
Subject: hasClassInitializer and exception
Date: Thu, 21 Jul 2005 18:14:50 +0200
User-agent: Mozilla Thunderbird 1.0.5 (X11/20050719)

Hey everyone,

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.

I have no patch to propose to you, but what i did (as a vm implementor) is reimplementing the VMObjectStreamClass.hasClassInitializer function, which now does the search without cliniting the class (so it doesn't use jni directly anymore).

Am I right?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]