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

MBeanInfo not serial compatible with JMX 1.1 RI and JDMK 5.0

XMLWordPrintable

    • b56
    • generic
    • generic

      In the JMX 1.1 RI, an MBeanInfo could be constructed with a null value for the various array parameters to the constructor (MBeanAttributeInfo[] etc). This null value was stored in the constructed object, but a zero-sized MBeanAttributeInfo[] was returned from MBeanInfo.getAttributes().

      In the JMX 1.2 RI, the behaviour was changed so that a null MBeanAttributeInfo[] parameter was immediately replaced by a zero-sized array in the constructed object.

      The problem is that the 1.2 RI therefore no longer expects an MBeanInfo ever to have a null array in its private fields ("attributes", etc). But if you deserialize an object that was serialized with the 1.1 RI, you can in fact have such a beast. This happens, for example, if you connect to a JDMK 5.0 agent through its RMI or HTTP connectors.

            emcmanus Eamonn McManus
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: