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

Descriptor should define equals method and specify how array values are compared

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 6
    • Component/s: core-svc
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b43
    • CPU:
      generic
    • OS:
      generic

      Description

      The Descriptor interface should acquire an equals(Object) method that specifies how Descriptors are compared for equality. This method should say:

      Compare this descriptor to another one. The objects are equal if they have the same field names (possibly differing in case) and the same associated values. Values that are primitive arrays of the same type are equal if they have the same elements. Values that are object arrays are equal if they compare equal with {@link Arrays#deepEquals(Object,Object)}.

      The interface should also define hashCode() with a definition that is consistent with this definition of equals.

      The implementation classes DescriptorSupport and ImmutableDescriptor should of course follow this specification. ImmutableDescriptor could also provide static convenience methods equals(Descriptor,Descriptor) and hashCode(Descriptor), though that might be overkill.
      ###@###.### 2005-04-15 15:44:28 GMT

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: