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

Brian Burkhalter bpb at openjdk.java.net
Wed Feb 10 02:58:39 UTC 2021


On Wed, 10 Feb 2021 01:55:24 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> src/java.base/share/classes/java/math/BigDecimal.java line 3062:
>> 
>>> 3060: 
>>> 3061:      * @apiNote
>>> 3062:      * Note: this class has a natural ordering that is inconsistent with equals.
>> 
>> Is `Note: ` really needed?
>
> This is the exact text recommended in java.lang.Comparable when a type's natural ordering is inconsistent with equals. The statement to that effect at the top of BigDecimal didn't use that exact wording

Okay, I see.

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

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


More information about the core-libs-dev mailing list