RFR 8129215: com.sun.jmx.mbeanserver.Introspector may provide results inconsistent with the JavaBeans Introspector
jaroslav.bachorik at oracle.com
Fri Jun 19 11:38:05 UTC 2015
On 19.6.2015 12:23, Alan Bateman wrote:
> On 19/06/2015 10:56, Jaroslav Bachorik wrote:
>> According to the JMX spec there should be 2 attributes: 'attribute'
>> and 'Attribute'
>> However, there is only one attribute resolved by the JavaBeans
>> Introspector and it is 'attribute'. Furthermore, the 'getattribute'
>> method is chosen as the getter method, rather counter-intuitively.
> The JMX monitor API specifies that it works like
> Introspector.getBeanInfo when it can't extract the value by other means.
> Are there are other areas in JMX where Introspector is used?
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
Given this statement in the Monitoring javadocs
"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.
More information about the serviceability-dev