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

ModelMBeanOperationInfo : ROE said thrown even field role has valid value other than operation

XMLWordPrintable

    • b47
    • generic
    • generic
    • Verified

      Javadoc of the two ModelMBeanOperationInfo constructors that take a Descriptor parameter say the field role should be "operation".
      Extract:

      [...]
      Throws:
          RuntimeOperationsException - Wraps an IllegalArgumentException. The descriptor is invalid, or descriptor field "name" is not equal to operation name, or descriptor field "DescriptorType" is not equal to "operation", or descriptor field "role" is not equal to "operation".
      [...]

      The ModelMBeanOperationInfo javadoc defines three valid values for field role.
      Extract:

      [...]
       role : must be "operation", "getter", or "setter
      [...]

      Why RuntimeOperationsException should be thrown when field role has valid value either "getter" or "setter" ?
      I did not try yet what does the current implementation so change subcategory & subtype if it is a doc only issue.

      ###@###.### 2005-04-08 15:48:44 GMT

      This is a doc only issue. The implementation of the ModelMBeanOperationInfo
      constructors is correct.

      Replace the sentence in the "@throws RuntimeOperationsException" clause in
      ModelMBeanOperationInfo constructors taking a Descriptor as input parameter
      as follows:

      ...or descriptor field "role" is not equal to "operation".

      must be replaced with:

      ...or if optional field "role" is specified but not equal to
      "operation", "getter" or "setter".

      ###@###.### 2005-04-13 23:35:36 GMT

            emcmanus Eamonn McManus
            yjoan Yves Joan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: