On Thu, 22 Jun 2023 19:03:03 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> Remove a redundant comparison in java.time `OffsetDateTime.compareTo()`. 
> If the `compareInstant` utility method returns 0 (equal), it compares the 
> `LocalDateTime`.
> However, `compareInstant` has already done that comparison; if it found 
> equal, the `compareTo` method unnecessarily does it again.
> The code is refactored in `compareInstant` to do the comparison of 
> `LocalDateTime` exactly once, if it is needed.
> 
> This case is covered by existing tests in 
> test/jdk/java/time/tck/java/time/TCKOffsetDateTime.java

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/14618

Reply via email to