* java/lang/natClass.cc (initializeClass): Link class.

From-SVN: r98540
This commit is contained in:
Tom Tromey 2005-04-22 02:33:31 +00:00 committed by Tom Tromey
parent 88ab7d19e4
commit 36a0d3d264
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2005-04-21 Tom Tromey <tromey@redhat.com>
* java/lang/natClass.cc (initializeClass): Link class.
2005-04-21 Tom Tromey <tromey@redhat.com>
* java/lang/AssertionError.java: Typo fix.

View File

@ -703,7 +703,20 @@ java::lang::Class::initializeClass (void)
JvSynchronize sync (this);
if (state < JV_STATE_LINKED)
java::lang::VMClassLoader::resolveClass (this);
{
try
{
_Jv_Linker::wait_for_state(this, JV_STATE_LINKED);
}
catch (java::lang::Throwable *x)
{
// Turn into a NoClassDefFoundError.
java::lang::NoClassDefFoundError *result
= new java::lang::NoClassDefFoundError(getName());
result->initCause(x);
throw result;
}
}
// Step 2.
java::lang::Thread *self = java::lang::Thread::currentThread();