-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
This is only a javadoc change to match the actual behavior of the implementation.
-
Java API
-
SE
Summary
The javadoc for java.util.jar.Attributes::equals
does not match the actual implementation.
Problem
The javadoc for java.util.jar.Attributes::equals
indicates that it checks to see if the given object is an instance of Attributes which it does not and the implementation has not changed since JDK 1.2.
Solution
Change the javadoc to match the implementation behavior as changing the implementation could potentially impact applications that expect the actual behavior.
Specification
Change the javadoc for the equals method from:
/**
* Compares the specified Attributes object with this Map for equality.
* Returns true if the given object is also an instance of Attributes
* and the two Attributes objects represent the same mappings.
*
* @param o the Object to be compared
* @return true if the specified Object is equal to this Map
*/
to
/**
* Compares the specified object to the underlying
* {@linkplain Attributes#map map} for equality.
* Returns true if the given object is also a Map
* and the two maps represent the same mappings.
*
* @param o the Object to be compared
* @return true if the specified Object is equal to this Map
*/
- csr of
-
JDK-8217393 java.util.jar.Attributes:equals() javadoc is not accurate
- Closed