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

DescriptorSupport(String) could recognize "name=value" as well as XML format

    Details

    • Subcomponent:
    • Resolved In Build:
      b43
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description

      The class javax.management.modelmbean.DescriptorSupport has a number of constructors, including:
          public DescriptorSupport(String inStr)
          public DescriptorSupport(String... fields)
      The first of these takes an XML string whose format is unspecified except that it must be the same as the format returned by the toXMLString() method. The second takes a list of strings each of which has the format "name=value".

      Somebody who tries to call the second constructor with just one string will actually end up calling the first one. This will always fail since "name=value" isn't a valid XML string.

      We should change the spec of the first constructor so that it accepts *either* an XML string *or* a string of the format "name=value".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jfdenise Jean-Francois Denise (Inactive)
                Reporter:
                emcmanus Eamonn McManus
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: