提交 d2231ec0 编写于 作者: C coffeys

8042789: org.omg.CORBA.ORBSingletonClass loading no longer uses context class loader

Reviewed-by: alanb, lancea
上级 ddb303a7
......@@ -291,28 +291,12 @@ abstract public class ORB {
(className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) {
singleton = new com.sun.corba.se.impl.orb.ORBSingleton();
} else {
singleton = create_impl_with_systemclassloader(className);
singleton = create_impl(className);
}
}
return singleton;
}
private static ORB create_impl_with_systemclassloader(String className) {
try {
ReflectUtil.checkPackageAccess(className);
ClassLoader cl = ClassLoader.getSystemClassLoader();
Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class;
Class<?> singletonOrbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass);
return (ORB)singletonOrbClass.newInstance();
} catch (Throwable ex) {
SystemException systemException = new INITIALIZE(
"can't instantiate default ORB implementation " + className);
systemException.initCause(ex);
throw systemException;
}
}
private static ORB create_impl(String className) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册