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

OpenMBeanInfoSupport.equals violates parent's contract

XMLWordPrintable

      The class OpenMBeanInfoSupport is a subclass of MBeanInfo and overrides its equals method. In addition to the requirements of MBeanInfo.equals, it requires that its argument be an instance of OpenMBeanInfo. This means that this method violates the symmetry property guaranteed by the contract for Object.equals. If I have an object mbeanInfo of class MBeanInfo and an object openMBeanInfo of class OpenMBeanInfoSupport, then mbeanInfo.equals(openMBeanInfo) might be true while openMBeanInfo.equals(mbeanInfo) is false. Similar remarks apply to OpenMBeanAttributeInfoSupport etc.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: