diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-07-16 21:07:25 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-07-16 21:07:25 +0000 |
commit | ab26ef78141c6d3e19e8011b7d5e5570b4e53f59 (patch) | |
tree | 2f06d03438c702d537ce93a79f7930297e601de0 /java/openjdk6/files/icedtea/security/20130618/8008611-jmx_annotations.patch | |
parent | HostDB is a system for generating internal DNS zones, (diff) |
Add multiple security patches and improvements from IcedTea6 1.12.6.
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-July/023941.html
Obtained from: IcedTea Project
PR: ports/180541
Diffstat (limited to 'java/openjdk6/files/icedtea/security/20130618/8008611-jmx_annotations.patch')
-rw-r--r-- | java/openjdk6/files/icedtea/security/20130618/8008611-jmx_annotations.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/java/openjdk6/files/icedtea/security/20130618/8008611-jmx_annotations.patch b/java/openjdk6/files/icedtea/security/20130618/8008611-jmx_annotations.patch new file mode 100644 index 000000000000..55c46fd18cec --- /dev/null +++ b/java/openjdk6/files/icedtea/security/20130618/8008611-jmx_annotations.patch @@ -0,0 +1,32 @@ +# HG changeset patch +# User egahlin +# Date 1363870588 -3600 +# Node ID 0ffc0656881cac6747ac1a62895e855750d1a04e +# Parent cd93c29052e6930c24a0350b8fe607ac1f1be068 +8008611: Better handling of annotations in JMX +Reviewed-by: skoivu, dholmes, jfdenise + +diff --git a/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java b/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java +--- jdk/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java ++++ jdk/src/share/classes/com/sun/jmx/mbeanserver/Introspector.java +@@ -359,13 +359,19 @@ + for (Annotation a : annots) { + Class<? extends Annotation> c = a.annotationType(); + Method[] elements = c.getMethods(); ++ boolean packageAccess = false; + for (Method element : elements) { + DescriptorKey key = element.getAnnotation(DescriptorKey.class); + if (key != null) { + String name = key.value(); + Object value; + try { +- value = element.invoke(a); ++ // Avoid checking access more than once per annotation ++ if (!packageAccess) { ++ ReflectUtil.checkPackageAccess(c); ++ packageAccess = true; ++ } ++ value = MethodUtil.invoke(element, a, null); + } catch (RuntimeException e) { + // we don't expect this - except for possibly + // security exceptions? |