diff options
author | Tom Tromey <tromey@redhat.com> | 2005-04-22 02:33:31 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2005-04-22 02:33:31 +0000 |
commit | 36a0d3d264f73b5f7b5a7a6793804b7c06a529cd (patch) | |
tree | 63043ece0a148eebb123acaf6ed4cf86b645fe45 /libjava/java/lang/natClass.cc | |
parent | 88ab7d19e4dbd213324a24c65da183dc8962c31a (diff) | |
download | gcc-36a0d3d264f73b5f7b5a7a6793804b7c06a529cd.zip gcc-36a0d3d264f73b5f7b5a7a6793804b7c06a529cd.tar.gz gcc-36a0d3d264f73b5f7b5a7a6793804b7c06a529cd.tar.bz2 |
* java/lang/natClass.cc (initializeClass): Link class.
From-SVN: r98540
Diffstat (limited to 'libjava/java/lang/natClass.cc')
-rw-r--r-- | libjava/java/lang/natClass.cc | 15 |
1 files changed, 14 insertions, 1 deletions
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(); |