-
Enhancement
-
Resolution: Fixed
-
P4
-
6
-
b43
-
generic
-
generic
-
Not verified
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".
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".
- relates to
-
JDK-6252592 Provide for the user mandatory fields missing in Descriptor given to Model*Info constructors
- Closed