diff --git a/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java b/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java index 491adc15fda1103c9fc0c572cb6f5ff778e4871f..67073dded283910b5483db8685c191bf12fa209a 100644 --- a/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java +++ b/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java @@ -51,6 +51,7 @@ import javax.management.MBeanOperationInfo; import javax.management.NotCompliantMBeanException; import javax.management.NotificationBroadcaster; import javax.management.ReflectionException; +import sun.reflect.misc.ReflectUtil; /** * An introspector for MBeans of a certain type. There is one instance @@ -175,7 +176,8 @@ abstract class MBeanIntrospector { /** * Get the methods to be analyzed to build the MBean interface. */ - List getMethods(final Class mbeanType) { + final List getMethods(final Class mbeanType) { + ReflectUtil.checkPackageAccess(mbeanType); return Arrays.asList(mbeanType.getMethods()); }