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

ModelMBeanAttributeInfo constructor modifies its Descriptor argument

XMLWordPrintable

    • b17
    • generic
    • generic
    • Not verified

      The ModelMBeanAttributeInfo and ModelMBeanConstructorInfo constructors both respect the spec to the letter: if the passed-in Descriptor does not contain the field displayName then it is added (as a side-effect of the private method isValid). Then the Descriptor is cloned. It would obviously be much cleaner to clone the Descriptor first, then add displayName if it is missing. In particular this would allow the caller to pass in a read-only Descriptor.
      ###@###.### 2003-12-12

            emcmanus Eamonn McManus
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: