loadClassName: use current class loader to find classes, before calling Class.forName().

This commit is contained in:
beard%netscape.com 2001-04-19 17:31:34 +00:00
Родитель edec17afb5
Коммит 426dfab4d7
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -2037,7 +2037,11 @@ public class ScriptRuntime {
new Object[0]);
if (cl != null)
return cl.loadClass(className);
}
} else {
ClassLoader cl = ScriptRuntime.class.getClassLoader();
if (cl != null)
return cl.loadClass(className);
}
} catch (SecurityException e) {
// fall through...
} catch (IllegalAccessException e) {

Просмотреть файл

@ -2037,7 +2037,11 @@ public class ScriptRuntime {
new Object[0]);
if (cl != null)
return cl.loadClass(className);
}
} else {
ClassLoader cl = ScriptRuntime.class.getClassLoader();
if (cl != null)
return cl.loadClass(className);
}
} catch (SecurityException e) {
// fall through...
} catch (IllegalAccessException e) {