mirror of
https://github.com/openjdk/jdk19u.git
synced 2025-12-11 00:58:35 -06:00
8293717: Objective view of ObjectView
Backport-of: fb692840530fa07174f9ad5c9f77d593e503a155
This commit is contained in:
parent
16343ff918
commit
b2e8d18fed
@ -91,13 +91,15 @@ public class ObjectView extends ComponentView {
|
||||
String classname = (String) attr.getAttribute(HTML.Attribute.CLASSID);
|
||||
try {
|
||||
ReflectUtil.checkPackageAccess(classname);
|
||||
Class<?> c = Class.forName(classname, true,Thread.currentThread().
|
||||
Class<?> c = Class.forName(classname, false,Thread.currentThread().
|
||||
getContextClassLoader());
|
||||
Object o = c.newInstance();
|
||||
if (o instanceof Component) {
|
||||
Component comp = (Component) o;
|
||||
setParameters(comp, attr);
|
||||
return comp;
|
||||
if (Component.class.isAssignableFrom(c)) {
|
||||
Object o = c.newInstance();
|
||||
if (o instanceof Component) {
|
||||
Component comp = (Component) o;
|
||||
setParameters(comp, attr);
|
||||
return comp;
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
// couldn't create a component... fall through to the
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user