ClassLoader patch
Per Bothner
per@bothner.com
Fri Jun 22 17:21:00 GMT 2001
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/
More information about the Java-patches
mailing list