Strange code in Class initalization

Bryce McKinlay bryce@albatross.co.nz
Tue Dec 7 11:56:00 GMT 1999


Kresten Krab Thorup wrote:

> As I remember it, the problem is that the call to ClassLoader::
> resolveClass0 (this); may cause an exception, and thus it should be
> called without the class lock enabled.

OK, Thanks. I see the problem. But I think it is wrong to check the
state before entering the monitor. Perhaps it would be better to call
_Jv_MonitorExit(); resolveClass0(); _Jv_MonitorEnter(); in the case of
an interpreted class?

regards

  [ bryce ]




More information about the Java mailing list