JDK-6255956 : Descriptor should define equals method and specify how array values are compared
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-04-15
  • Updated: 2017-05-16
  • Resolved: 2005-06-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b43Fixed
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

Comments
EVALUATION Straightforward fix that would be consistent with practice in e.g. the Collections API. ###@###.### 2005-04-15 15:55:23 GMT
15-04-2005