}
if (cls == null) {
if (fatal)
throw getCreateException(clsName, val, new ClassNotFoundException(clsName));
Log log = (conf == null) ? null : conf.getConfigurationLog();
if (log != null && log.isErrorEnabled())
log.error(_loc.get("plugin-creation-exception", val));
return null;
}
try {
return AccessController.doPrivileged(J2DoPrivHelper.newInstanceAction(cls));
} catch (Exception e) {
if (e instanceof PrivilegedActionException) {
e = ((PrivilegedActionException) e).getException();
}
RuntimeException re = new NestableRuntimeException(_loc.get("obj-create", cls).getMessage(), e);
if (fatal)
throw re;
Log log = (conf == null) ? null : conf.getConfigurationLog();
if (log != null && log.isErrorEnabled())
log.error(_loc.get("plugin-creation-exception", val), re);
return null;
}
}