mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-02 04:55:31 +08:00
jni.cc (_Jv_JNI_FindClass): Use system class loader if class doesn't have a loader.
* jni.cc (_Jv_JNI_FindClass): Use system class loader if class doesn't have a loader. From-SVN: r33272
This commit is contained in:
parent
807bc1db3d
commit
af98124ef9
@ -1,3 +1,8 @@
|
||||
2000-04-19 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* jni.cc (_Jv_JNI_FindClass): Use system class loader if class
|
||||
doesn't have a loader.
|
||||
|
||||
2000-04-19 Bryce McKinlay <bryce@albatross.co.nz>
|
||||
|
||||
* boehm.cc: (_Jv_MarkObj, _Jv_MarkArray): Cast pointers for
|
||||
|
@ -424,15 +424,16 @@ _Jv_JNI_FindClass (JNIEnv *env, const char *name)
|
||||
// This might throw an out of memory exception.
|
||||
jstring n = JvNewStringUTF (s);
|
||||
|
||||
java::lang::ClassLoader *loader;
|
||||
if (env->klass == NULL)
|
||||
java::lang::ClassLoader *loader = NULL;
|
||||
if (env->klass != NULL)
|
||||
loader = env->klass->getClassLoader ();
|
||||
|
||||
if (loader == NULL)
|
||||
{
|
||||
// FIXME: should use getBaseClassLoader, but we don't have that
|
||||
// yet.
|
||||
loader = java::lang::ClassLoader::getSystemClassLoader ();
|
||||
}
|
||||
else
|
||||
loader = env->klass->getClassLoader ();
|
||||
|
||||
r = loader->loadClass (n);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user