Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
8293717: Objective view of ObjectView
Browse files Browse the repository at this point in the history
Reviewed-by: bae
Backport-of: fb692840530fa07174f9ad5c9f77d593e503a155
  • Loading branch information
Yuri Nesterenko committed Jan 16, 2023
1 parent 11c60c1 commit ffa5c1a
Showing 1 changed file with 8 additions and 6 deletions.
Expand Up @@ -91,13 +91,15 @@ protected Component createComponent() {
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
Expand Down

0 comments on commit ffa5c1a

Please sign in to comment.