Re: RFR: JDK-8280168: Add Objects.toIdentityString [v7]

2022-01-25 Thread Roger Riggs
On Mon, 24 Jan 2022 21:31:37 GMT, Joe Darcy  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
>
> Joe Darcy has updated the pull request with a new target base due to a merge 
> or a rebase. The incremental webrev excludes the unrelated changes brought in 
> by the merge/rebase. The pull request contains eight additional commits since 
> the last revision:
> 
>  - Respond to review feedback.
>  - Merge branch 'master' into JDK-8280168
>  - Merge branch 'master' into JDK-8280168
>  - Appease jcheck.
>  - Add toIdentityString
>  - Respond to review feedback to augment test.
>  - Respond to review feedback.
>  - JDK-8280168 Add Objects.toDefaultString

Looks good

-

Marked as reviewed by rriggs (Reviewer).

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


Re: RFR: JDK-8280168: Add Objects.toIdentityString [v7]

2022-01-25 Thread Alan Bateman
On Mon, 24 Jan 2022 21:31:37 GMT, Joe Darcy  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
>
> Joe Darcy has updated the pull request with a new target base due to a merge 
> or a rebase. The incremental webrev excludes the unrelated changes brought in 
> by the merge/rebase. The pull request contains eight additional commits since 
> the last revision:
> 
>  - Respond to review feedback.
>  - Merge branch 'master' into JDK-8280168
>  - Merge branch 'master' into JDK-8280168
>  - Appease jcheck.
>  - Add toIdentityString
>  - Respond to review feedback to augment test.
>  - Respond to review feedback.
>  - JDK-8280168 Add Objects.toDefaultString

Updated proposal and naming looks okay.

-

Marked as reviewed by alanb (Reviewer).

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


Re: RFR: JDK-8280168: Add Objects.toIdentityString [v7]

2022-01-24 Thread Mandy Chung
On Mon, 24 Jan 2022 21:31:37 GMT, Joe Darcy  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
>
> Joe Darcy has updated the pull request with a new target base due to a merge 
> or a rebase. The incremental webrev excludes the unrelated changes brought in 
> by the merge/rebase. The pull request contains eight additional commits since 
> the last revision:
> 
>  - Respond to review feedback.
>  - Merge branch 'master' into JDK-8280168
>  - Merge branch 'master' into JDK-8280168
>  - Appease jcheck.
>  - Add toIdentityString
>  - Respond to review feedback to augment test.
>  - Respond to review feedback.
>  - JDK-8280168 Add Objects.toDefaultString

Marked as reviewed by mchung (Reviewer).

-

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


Re: RFR: JDK-8280168: Add Objects.toIdentityString [v7]

2022-01-24 Thread Stuart Marks
On Mon, 24 Jan 2022 21:31:37 GMT, Joe Darcy  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
>
> Joe Darcy has updated the pull request with a new target base due to a merge 
> or a rebase. The incremental webrev excludes the unrelated changes brought in 
> by the merge/rebase. The pull request contains eight additional commits since 
> the last revision:
> 
>  - Respond to review feedback.
>  - Merge branch 'master' into JDK-8280168
>  - Merge branch 'master' into JDK-8280168
>  - Appease jcheck.
>  - Add toIdentityString
>  - Respond to review feedback to augment test.
>  - Respond to review feedback.
>  - JDK-8280168 Add Objects.toDefaultString

Marked as reviewed by smarks (Reviewer).

-

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


Re: RFR: JDK-8280168: Add Objects.toIdentityString [v7]

2022-01-24 Thread Joe Darcy
On Mon, 24 Jan 2022 21:51:13 GMT, Rémi Forax  wrote:

> toIdentityString is a better name than toDefaultString.
> 
> It's fine for me but given that "identity" has a slightly different meaning 
> in the context of Valhalla that in System.identityHashCode(), it may be good 
> to ask Brian about that name.

Modulo the method name, I have discussed with Brian adding a method with 
toIdentityString's semantics to Objects and he agreed the method was worth 
having.

-

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


Re: RFR: JDK-8280168: Add Objects.toIdentityString [v7]

2022-01-24 Thread Rémi Forax
On Mon, 24 Jan 2022 21:31:37 GMT, Joe Darcy  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
>
> Joe Darcy has updated the pull request with a new target base due to a merge 
> or a rebase. The incremental webrev excludes the unrelated changes brought in 
> by the merge/rebase. The pull request contains eight additional commits since 
> the last revision:
> 
>  - Respond to review feedback.
>  - Merge branch 'master' into JDK-8280168
>  - Merge branch 'master' into JDK-8280168
>  - Appease jcheck.
>  - Add toIdentityString
>  - Respond to review feedback to augment test.
>  - Respond to review feedback.
>  - JDK-8280168 Add Objects.toDefaultString

toIdentityString is a better name than toDefaultString.

It's fine for me but given that "identity" has a slightly different meaning in 
the context of Valhalla that in System.identityHashCode(), it may be good to 
ask Brian about that name.

-

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


Re: RFR: JDK-8280168: Add Objects.toIdentityString [v7]

2022-01-24 Thread Joe Darcy
> 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

Joe Darcy has updated the pull request with a new target base due to a merge or 
a rebase. The incremental webrev excludes the unrelated changes brought in by 
the merge/rebase. The pull request contains eight additional commits since the 
last revision:

 - Respond to review feedback.
 - Merge branch 'master' into JDK-8280168
 - Merge branch 'master' into JDK-8280168
 - Appease jcheck.
 - Add toIdentityString
 - Respond to review feedback to augment test.
 - Respond to review feedback.
 - JDK-8280168 Add Objects.toDefaultString

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7139/files
  - new: https://git.openjdk.java.net/jdk/pull/7139/files/0a4d8a4f..b7ef3017

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7139&range=06
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7139&range=05-06

  Stats: 862 lines in 62 files changed: 548 ins; 203 del; 111 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7139.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7139/head:pull/7139

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