RFR 8080663: Use sun.misc.SharedSecrets to allow access from java.management to @ConstructorProperties
Mandy Chung
mandy.chung at oracle.com
Wed May 20 14:38:19 UTC 2015
On 05/19/2015 06:39 AM, Jaroslav Bachorik wrote:
> Please, review the following change
>
> Issue : https://bugs.openjdk.java.net/browse/JDK-8080663 <https://bugs.openjdk.java.net/browse/JDK-8080663>
> Webrev: http://cr.openjdk.java.net/~jbachorik/8080663/webrev.00 <http://cr.openjdk.java.net/~jbachorik/8080663/webrev.00>
>
> The title says it all. This enhancement is about replacing the arbitrary reflection based code with a cleaner approach based on sun.misc.SharedSecrets class.
>
Using the shared secret approach is okay. Some suggestion:
Since both sun.misc.JavaBeansIntrospectorAccess and ConstructorPropertiesAccess are for JMX to access java.beans types, it could be simplified to have one single interface (e.g. sun.misc.JavaBeansAccess) to define
Method getReadMethod(Class<?>, String);
String[] getConstructorProperties(Constructor);
AnnotationHelper and BeansIntrospector can then be merged into the new JavaBeansAccessor class.
Can you add a regression for this, if not exist, as Daniel points out?
Mandy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20150520/3ccb92ba/attachment.html>
More information about the serviceability-dev
mailing list