From: Tom Tromey Date: Fri, 22 Apr 2005 02:33:31 +0000 (+0000) Subject: * java/lang/natClass.cc (initializeClass): Link class. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36a0d3d264f73b5f7b5a7a6793804b7c06a529cd;p=platform%2Fupstream%2Fgcc.git * java/lang/natClass.cc (initializeClass): Link class. From-SVN: r98540 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 311eba7..5712644 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,9 @@ 2005-04-21 Tom Tromey + * java/lang/natClass.cc (initializeClass): Link class. + +2005-04-21 Tom Tromey + * java/lang/AssertionError.java: Typo fix. 2005-04-21 Tom Tromey diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index b936947..e29ed68 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -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();