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: VMClassLoader fix


I'm checking this in on the trunk.

VMClassLoader.loadClass was calling _Jv_InitClass when 'resolve' was
true.  This is incorrect, we should resolve the class, not initialize
it.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* java/lang/natVMClassLoader.cc (loadClass): Call resolveClass,
	not _Jv_InitClass.

Index: java/lang/natVMClassLoader.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natVMClassLoader.cc,v
retrieving revision 1.10
diff -u -r1.10 natVMClassLoader.cc
--- java/lang/natVMClassLoader.cc 5 Apr 2005 22:26:25 -0000 1.10
+++ java/lang/natVMClassLoader.cc 19 Apr 2005 06:33:57 -0000
@@ -216,7 +216,7 @@
       // It isn't clear from the spec, but this is what other
       // implementations do in practice.
       if (resolve)
-	_Jv_InitClass (klass);
+	resolveClass (klass);
       else
 	_Jv_Linker::wait_for_state (klass, JV_STATE_LOADING);
 


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