提交 67138234 编写于 作者: D dsamersoff

7192975: Issue with JMX reflection

Summary: Make security check unconditional
Reviewed-by: ahgross, asaha
Contributed-by: jaroslav.bachorik@oracle.com
上级 7fdc8b4b
......@@ -1245,13 +1245,12 @@ public class DescriptorSupport
return s.substring(1, s.length() - 1);
}
final String className = s.substring(1, slash);
final Constructor<?> constr;
try {
ReflectUtil.checkPackageAccess(className);
final ClassLoader contextClassLoader =
Thread.currentThread().getContextClassLoader();
if (contextClassLoader == null) {
ReflectUtil.checkPackageAccess(className);
}
final Class<?> c =
Class.forName(className, false, contextClassLoader);
constr = c.getConstructor(new Class<?>[] {String.class});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册