RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v3]

Joe Darcy darcy at openjdk.java.net
Fri Feb 12 22:52:06 UTC 2021


On Fri, 12 Feb 2021 22:39:55 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Added "The string output is not necessary stable over time." The particulars of the toString contract of a given class will depend on the class of course.
>
> Perhaps "necessary" -> "necessarily"

Good catch Roger; will change to
"The string output is not necessarily stable over time or across JVM invocations."
The latter clause will more explicitly handle cases like "myEnumConstant.toString() gave different answers when I ran the program multiple times," a bug that has been submitted as closed as not-a-bug repeated.

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

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


More information about the core-libs-dev mailing list