- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
  P4                     
     - 
    Affects Version/s: 5.0
 - 
    Component/s: tools
 
- 
        b05
 - 
        x86
 - 
        windows_xp
 - 
        Verified
 
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-2149766 | 6u4 | Luis-Miguel Alventosa | P4 | Resolved | Fixed | b01 | 
                    FULL PRODUCT VERSION :
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Despite accurately reporting the attribute type in the MBeanInfo (including a full description of the CompositeData involved), jconsole does not produce a useful rendering of CompositeData[] attributes.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I created a standard MBean returning this data, extending StandardMBean and then augmenting the MBeanInfo as necessary. I believe all that is *necessary* to produce this issue is to have a CompositeData[] attribute, though.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would have expected the same sort of CompositeData[] treatment as nested fields of this type within CompositeData (e.g. within thread info) get -- but that does not seem to be the way top-level attributes of type CompositeData[] are treated.
ACTUAL -
The result was essentially a useless toString() rendering of the array!
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
I had to return TabularData using the arrayIndex as the key, but this does not produce the clearly desired order (idx=0,1,2,...) but rather random (hash) ordering based on Object[new Integer(idx)].
            
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Despite accurately reporting the attribute type in the MBeanInfo (including a full description of the CompositeData involved), jconsole does not produce a useful rendering of CompositeData[] attributes.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I created a standard MBean returning this data, extending StandardMBean and then augmenting the MBeanInfo as necessary. I believe all that is *necessary* to produce this issue is to have a CompositeData[] attribute, though.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would have expected the same sort of CompositeData[] treatment as nested fields of this type within CompositeData (e.g. within thread info) get -- but that does not seem to be the way top-level attributes of type CompositeData[] are treated.
ACTUAL -
The result was essentially a useless toString() rendering of the array!
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
I had to return TabularData using the arrayIndex as the key, but this does not produce the clearly desired order (idx=0,1,2,...) but rather random (hash) ordering based on Object[new Integer(idx)].
- backported by
 - 
                    
JDK-2149766 MBeans tab: Attributes of type CompositeData[] are not rendered well
-         
     - Resolved
 
 -         
 
- relates to
 - 
                    
JDK-6471916 HotSpotDiagnostic MXBean's getDiagnosticOptions() should return Map<String,VMOption>
-         
     - Closed
 
 -