From 21f59d925e3c04d633a4f639fc4e054a05474ec9 Mon Sep 17 00:00:00 2001 From: jbachorik Date: Thu, 14 Mar 2013 14:45:55 +0100 Subject: [PATCH] 8008607: Better input checking in JMX Reviewed-by: dfuchs, mchung, skoivu, sjiang --- .../classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java b/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java index 491adc15f..67073dded 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()); } -- GitLab