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]

ClassLoader patch


I consider this an obvious patch - without it, loadClass can get a seg fault.
Unless someone objects, I'll check it into the trunk and the 3.0.1 branch.
        --Per

2001-06-22  Per Bothner  <per@bothner.com>

	*java/lang/ClassLoader.java (loadClass):  Call getSystemClassLoader()
	incase the system field is still null.

Index: java/lang/ClassLoader.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/ClassLoader.java,v
retrieving revision 1.13
diff -u -p -r1.13 ClassLoader.java
--- ClassLoader.java	2001/05/06 13:42:11	1.13
+++ ClassLoader.java	2001/06/22 23:26:16
@@ -120,7 +120,7 @@ public abstract class ClassLoader
 	  if (parent != null)
 	    return parent.loadClass (name, link);
 	  else
-	    c = system.findClass (name);
+	    c = getSystemClassLoader ().findClass (name);
 	} catch (ClassNotFoundException ex) {
 	  /* ignore, we'll try findClass */;
 	}

-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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