Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6333561

MBeans tab: Attributes of type CompositeData[] are not rendered well

XMLWordPrintable

    • b05
    • x86
    • windows_xp
    • Verified

        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)].

              lmalvent Luis-Miguel Alventosa (Inactive)
              emcmanus Eamonn McManus
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: