RFR: JDK-8238239: java.lang.Record spec clarifications

Leonid Kuskov leonid.kuskov at oracle.com
Thu Feb 6 00:55:29 UTC 2020


Although methods (toString, hashCode)  return different representations 
of a record (either textual or algorithmic)

Spec for String toString();  everywhere refers to "the object":

* Returns a string representation of the object.
* @return  a string representation of the object.

from the other side hashCode(); spec uses "the record" as the object of 
the sentences:

* Returns a hash code value for the record.
* @return  a hash code value for this record.

Does it make sense to use a sole pattern in the descriptions?

Thanks,
Leonid

On 2/4/20 12:38, Vicente Romero wrote:
> Please review the fix for [1] at [2] along with the corresponding CSR 
> at [3]. The fix pretends to clarify the specification for 
> java.lang.Record. Please see the CSR for more detail,
>
> Thanks,
> Vicente
>
> PS, thanks to John Rose for proposing this fix
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8238239
> [2] http://cr.openjdk.java.net/~vromero/8238239/webrev.00/
> [3] https://bugs.openjdk.java.net/browse/JDK-8238240


More information about the core-libs-dev mailing list