RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface [v2]
Tagir F. Valeev
tvaleev at openjdk.org
Thu May 22 07:04:52 UTC 2025
On Wed, 21 May 2025 11:55:07 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
>> Tagir F. Valeev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Return first argument in case of tie (to be consistent with BinaryOperator); junit tests
>
> src/java.base/share/classes/java/util/Comparator.java line 200:
>
>> 198: * @return the larger of {@code a} and {@code b} according to this comparator.
>> 199: * @throws ClassCastException if the collection contains elements that are
>> 200: * not <i>mutually comparable</i> (for example, strings and
>
> `<em>` is more intent revealing.
> Suggestion:
>
> * not <em>mutually comparable</em> (for example, strings and
I copied this sentence from `java.util.Collections` where `<i>` is used 48 times. I'll replace it here with `<em>`, but probably it should be updated en-masse for consistency?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25297#discussion_r2101795425
More information about the core-libs-dev
mailing list