-
Bug
-
Resolution: Duplicate
-
P3
-
6
-
None
-
generic
-
generic
The "Type mapping rules" section in MXBean specification describes cases of mapping when the Open Type is TabularType or CompositeType.
However it is not specified what typeName parameter is used for constructing both TabularType and CompositeType - it can be whatever the implementor wants. The problem is that the value of this field participates in comparison of 2 TabularType/CompositeType objects.
The only place in spec, which marginally says about the typeName value is:
<excerpt>
For example, the TabularType for a Map<String,ObjectName> might be constructed with code like this:
String typeName =
"java.util.Map<java.lang.String,javax.management.ObjectName>";
String[] keyValue =
new String[] {"key", "value"};
OpenType[] openTypes =
new OpenType[] {SimpleType.STRING, SimpleType.OBJECTNAME};
CompositeType rowType =
new CompositeType(typeName, typeName, keyValue, keyValue, openTypes);
TabularType tabularType =
new TabularType(typeName, typeName, rowType, new String[] {"key"});
</excerpt>
However it is not specified what typeName parameter is used for constructing both TabularType and CompositeType - it can be whatever the implementor wants. The problem is that the value of this field participates in comparison of 2 TabularType/CompositeType objects.
The only place in spec, which marginally says about the typeName value is:
<excerpt>
For example, the TabularType for a Map<String,ObjectName> might be constructed with code like this:
String typeName =
"java.util.Map<java.lang.String,javax.management.ObjectName>";
String[] keyValue =
new String[] {"key", "value"};
OpenType[] openTypes =
new OpenType[] {SimpleType.STRING, SimpleType.OBJECTNAME};
CompositeType rowType =
new CompositeType(typeName, typeName, keyValue, keyValue, openTypes);
TabularType tabularType =
new TabularType(typeName, typeName, rowType, new String[] {"key"});
</excerpt>
- duplicates
-
JDK-6367912 The description of field "originalType" in MXBean javadoc is inconsistent with Descriptor's spec
- Resolved