RFR 8129215: com.sun.jmx.mbeanserver.Introspector may provide results inconsistent with the JavaBeans Introspector
Jaroslav Bachorik
jaroslav.bachorik at oracle.com
Fri Jun 19 12:05:07 UTC 2015
On 19.6.2015 13:44, Alan Bateman wrote:
>
> On 19/06/2015 12:38, Jaroslav Bachorik wrote:
>>
>> Both the j.b.Introspector.getReadMethod() and the
>> SimpleIntrospector.getReadMethod() are used only from
>> c.s.j.m.Introspector.elementFromComplex() method and only to resolve
>> the getter for a complex attribute.
>>
>> So, any change in the SimpleIntrospector will not affect the rest of
>> the JMX system.
>>
>> Given this statement in the Monitoring javadocs
>> (https://docs.oracle.com/javase/8/docs/api/javax/management/monitor/package-summary.html)
>>
>>
>> "If the above rules do not produce a value, and if introspection, as
>> if by calling Introspector.getBeanInfo, for the class of v
>> (v.getClass()) identifies a property with the name e, then x is the
>> result of reading the property value."
>>
>> I would strongly propose to adjust the SimpleIntrospector to closely
>> follow the j.b.Introspector functionality.
>>
> I added the SimpleIntrospector and also adjusted the above wording in
> the monitor package description to make it possible to have JMX in a
> compact Profile of Java SE that didn't have java.beans.
>
> The intention was that the SimpleIntrospector works like the beans
> Introspector. So I agree this is the right thing to do but we should
> create a bug for the issue that Daniel brings up.
I'm not sure there is an issue here. The monitoring api attribute names
seem to be governed by different rules than the MBean attribute names.
This change relates to the monitoring api only and brings the
implementation up to the what is specified in the javadoc.
-JB-
>
> -Alan.
More information about the serviceability-dev
mailing list