RFR 8080663: Use sun.misc.SharedSecrets to allow access from java.management to @ConstructorProperties

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Mon May 25 11:56:13 UTC 2015


On 25.5.2015 11:34, Jaroslav Bachorik wrote:
> On 20.5.2015 16:38, Mandy Chung wrote:
>> On 05/19/2015 06:39 AM, Jaroslav Bachorik wrote:
>>> Please, review the following change
>>>
>>> Issue : https://bugs.openjdk.java.net/browse/JDK-8080663
>>> Webrev: 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.
>
> Webrev with the merged accessor interface:
> http://cr.openjdk.java.net/~jbachorik/8080663/webrev.00

Sorry, wrong URL. Should be > 
http://cr.openjdk.java.net/~jbachorik/8080663/webrev.01

-JB-

>
>
>>
>> Can you add a regression for this, if not exist, as Daniel points out?
>
> There is a bunch of tests exercising the proper handling of
> @ConstructorAnnotationProperties - I added this issue number to the list
> of bug ids. Doesn't really seem to be worth adding a separate regtest.
>
> -JB-
>
>>
>> Mandy
>



More information about the serviceability-dev mailing list