JDK-6377387 : MBeans tab: bad parsing of ObjectNames in tree leads to incorrect tree display
  • Type: Bug
  • Component: tools
  • Sub-Component: jconsole
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-01-26
  • Updated: 2010-07-29
  • Resolved: 2006-02-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u8Fixed 6 b71Fixed
Description
The parsing of ObjectNames by the jconsole mbean tab's tree view would appear
to be incorrect, not catering for ObjectName values that are quoted.

e.g. for an ObjectName of the form:

domain:type=association,parent="domain:type=node,name=\"node1\"",child="domain:type=node,name=\"node2\""

then the tree will not show a tree with three nodes (type, parent, child) but will incorrectly parse the ObjectName and will display a tree with 7 nodes (one for each '=' sign).

Comments
EVALUATION Unfortunately ObjectName.getKeyPropertyList() does not preserve key property list creation order so ObjectName.getKeyPropertyListString() has to be used. The way key properties in ObjectNames are parsed to build the MBean tree has been modified to take into account "," characters inside quoted values.
26-01-2006

EVALUATION I have verified that this is indeed the case. Plainly the code that builds the tree is parsing the string form of the ObjectName when it should be using ObjectName.getKeyPropertyList().
26-01-2006