Integrated: JDK-8280168: Add Objects.toIdentityString

Joe Darcy darcy at openjdk.java.net
Tue Jan 25 18:19:37 UTC 2022


On Tue, 18 Jan 2022 23:15:20 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> While it is strongly recommend to not use the default toString for a class, at times it is the least-bad alternative. When that alternative needs to be used, it would be helpful to have the implementation already available, such as in Objects.toDefaultString(). This method is analagous to System.identityHashCode.
> 
> Please also review the CSR: https://bugs.openjdk.java.net/browse/JDK-8280184

This pull request has now been integrated.

Changeset: cbe8395a
Author:    Joe Darcy <darcy at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/cbe8395ace3230dc599c7f082e3524a861b2da8e
Stats:     61 lines in 3 files changed: 56 ins; 1 del; 4 mod

8280168: Add Objects.toIdentityString

Reviewed-by: alanb, mchung, rriggs, smarks

-------------

PR: https://git.openjdk.java.net/jdk/pull/7139


More information about the core-libs-dev mailing list