Mercurial > hg > release > icedtea7-forest-2.1 > jdk
changeset 4914:53d83931a29f
8008607: Better input checking in JMX
Reviewed-by: dfuchs, mchung, skoivu, sjiang
author | jbachorik |
---|---|
date | Thu, 14 Mar 2013 14:45:55 +0100 |
parents | 05e7f2135bca |
children | 0fe7dd24c5bb |
files | src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java Thu Mar 07 14:05:05 2013 +0100 +++ b/src/share/classes/com/sun/jmx/mbeanserver/MBeanIntrospector.java Thu Mar 14 14:45:55 2013 +0100 @@ -51,6 +51,7 @@ 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 @@ /** * 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()); }