This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: fix up resolveClass


I'm checking this in on the trunk.

My recent resolveClass patch broke everything.  This fixes it.

Tom

2005-04-21  Tom Tromey  <tromey@redhat.com>

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

Index: java/lang/natClass.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natClass.cc,v
retrieving revision 1.87
diff -u -r1.87 natClass.cc
--- java/lang/natClass.cc 24 Mar 2005 00:04:18 -0000 1.87
+++ java/lang/natClass.cc 22 Apr 2005 02:12:19 -0000
@@ -703,7 +703,20 @@
     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();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]