-
Enhancement
-
Resolution: Fixed
-
P4
-
5.0
-
b17
-
generic
-
generic
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2152914 | OpenJDK6 | Joel Feraud | P3 | Resolved | Fixed | b01 |
For ModelMBeanAttributeInfo, ModelMBeanInfoSupport, ModelMBeanConstructorInfo
ModelMBeanNotificationInfo and ModelMBeanOperationInfo, the descriptor provided
to the relevant constructors must contain at least two fields : name and descriptorType.
The field name is already provided as another constructor parameter.
The field descriptorType has a single possible value except for ModelMBeanOperationInfo where 3 values are valid but one is defined as default.
Current specified behavior is to throw RuntimeOperationsException when either field name or descriptorType is missing.
User scenario is that you get a RuntimeOperationsException because the descriptor you provide is not valid and you wonder why. The javadoc does not explain what is a valid descriptor except for method DescriptorSupport.isValid() but there is no href from all constructors taking a Descriptor so it is unfriendly.
Because the constructor has all in hands to add itself the missing fields, it might do so.
Asking the user some input the implementation could provide for him is avoidable complexity.
That approach could be extended to other fields defined as mandatory for a particular class.
###@###.### 2005-04-08 15:21:47 GMT
ModelMBeanNotificationInfo and ModelMBeanOperationInfo, the descriptor provided
to the relevant constructors must contain at least two fields : name and descriptorType.
The field name is already provided as another constructor parameter.
The field descriptorType has a single possible value except for ModelMBeanOperationInfo where 3 values are valid but one is defined as default.
Current specified behavior is to throw RuntimeOperationsException when either field name or descriptorType is missing.
User scenario is that you get a RuntimeOperationsException because the descriptor you provide is not valid and you wonder why. The javadoc does not explain what is a valid descriptor except for method DescriptorSupport.isValid() but there is no href from all constructors taking a Descriptor so it is unfriendly.
Because the constructor has all in hands to add itself the missing fields, it might do so.
Asking the user some input the implementation could provide for him is avoidable complexity.
That approach could be extended to other fields defined as mandatory for a particular class.
###@###.### 2005-04-08 15:21:47 GMT
- backported by
-
JDK-2152914 Provide for the user mandatory fields missing in Descriptor given to Model*Info constructors
- Resolved
- relates to
-
JDK-4967755 ModelMBeanAttributeInfo constructor modifies its Descriptor argument
- Closed
-
JDK-6501362 DescriptorSupport(String) could recognize "name=value" as well as XML format
- Closed