提交 21f59d92 编写于 作者: J jbachorik

8008607: Better input checking in JMX

Reviewed-by: dfuchs, mchung, skoivu, sjiang
上级 5eb426e8
...@@ -51,6 +51,7 @@ import javax.management.MBeanOperationInfo; ...@@ -51,6 +51,7 @@ import javax.management.MBeanOperationInfo;
import javax.management.NotCompliantMBeanException; import javax.management.NotCompliantMBeanException;
import javax.management.NotificationBroadcaster; import javax.management.NotificationBroadcaster;
import javax.management.ReflectionException; import javax.management.ReflectionException;
import sun.reflect.misc.ReflectUtil;
/** /**
* An introspector for MBeans of a certain type. There is one instance * An introspector for MBeans of a certain type. There is one instance
...@@ -175,7 +176,8 @@ abstract class MBeanIntrospector<M> { ...@@ -175,7 +176,8 @@ abstract class MBeanIntrospector<M> {
/** /**
* Get the methods to be analyzed to build the MBean interface. * Get the methods to be analyzed to build the MBean interface.
*/ */
List<Method> getMethods(final Class<?> mbeanType) { final List<Method> getMethods(final Class<?> mbeanType) {
ReflectUtil.checkPackageAccess(mbeanType);
return Arrays.asList(mbeanType.getMethods()); return Arrays.asList(mbeanType.getMethods());
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册