RFR: 8310033: Clarify return value of Java Time compareTo methods [v9]
Pavel Rappo
prappo at openjdk.org
Fri Jul 21 17:13:47 UTC 2023
On Fri, 21 Jul 2023 15:59:42 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> In java.time packages, clarify timeline order javadoc to mention "before" and "after" in the value of the `compareTo` method return values.
>> Add javadoc @see tags to isBefore and isAfter methods
>>
>> Replace use of "negative" and positive with "less than zero" and "greater than zero" in javadoc @return
>> The term "positive" is ambiguous, zero is considered positive and indicates equality.
>
> Roger Riggs 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 14 additional commits since the last revision:
>
> - Merge branch 'master' into 8310033-time-compareto
> - Corrected descriptions with respect to chronology and the concrete temporary type.
> - Improve wording and remove markup for clarity
> - Merge branch 'master' into 8310033-time-compareto
> - Correct the descriptions to correctly identify the compareTo return
> value < 0 as this is before that, and > 0 as this is after that.
> Thanks to a careful reviewer spotting my reversing of the conditions.
> - Improve the grammar of "the comparator value is" -> "the comparator value, that is"
> Thanks for the reminder.
> - Merge branch 'master' into 8310033-time-compareto
> - Improve descriptions to be more specific and remove inappropriate use of before/after
> Remove extra blank lines
> - Clarify return values of date time classes
> - Use {@code xxx} to highlight the comparison against the arg.
> Update copyrights.
> - ... and 4 more: https://git.openjdk.org/jdk/compare/62616dc3...5ecd7aeb
Looks good to me.
-------------
Marked as reviewed by prappo (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/14479#pullrequestreview-1541529827
More information about the core-libs-dev
mailing list