Re: RFR: 8273369: Computing micros between two instants unexpectedly overflows for some cases [v4]
On Wed, 8 Sep 2021 00:15:46 GMT, Joe Wang wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Moved the constant to LocalTime for consistency. > > test/jdk/java/time/test/java/time/TestInstant.java line 102: > >> 100: >> 101: @Test >> 102: public void test_microsUntil() { > > A comment about the test might be helpful. Indeed. Added some comments to the test. - PR: https://git.openjdk.java.net/jdk/pull/5396
Re: RFR: 8273369: Computing micros between two instants unexpectedly overflows for some cases [v4]
On Tue, 7 Sep 2021 20:29:29 GMT, Naoto Sato wrote: >> Please review the fix to the issue. Avoiding overflow by not calling >> nanosUntil() directly, which will overflow beyond Long.MAX_VALUE difference >> in nano unit. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Moved the constant to LocalTime for consistency. Marked as reviewed by joehw (Reviewer). test/jdk/java/time/test/java/time/TestInstant.java line 102: > 100: > 101: @Test > 102: public void test_microsUntil() { A comment about the test might be helpful. - PR: https://git.openjdk.java.net/jdk/pull/5396
Re: RFR: 8273369: Computing micros between two instants unexpectedly overflows for some cases [v4]
On Tue, 7 Sep 2021 20:29:29 GMT, Naoto Sato wrote: >> Please review the fix to the issue. Avoiding overflow by not calling >> nanosUntil() directly, which will overflow beyond Long.MAX_VALUE difference >> in nano unit. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Moved the constant to LocalTime for consistency. Marked as reviewed by rriggs (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/5396
Re: RFR: 8273369: Computing micros between two instants unexpectedly overflows for some cases [v4]
> Please review the fix to the issue. Avoiding overflow by not calling > nanosUntil() directly, which will overflow beyond Long.MAX_VALUE difference > in nano unit. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Moved the constant to LocalTime for consistency. - Changes: - all: https://git.openjdk.java.net/jdk/pull/5396/files - new: https://git.openjdk.java.net/jdk/pull/5396/files/7d567e8b..bbd6abc3 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=5396=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk=5396=02-03 Stats: 10 lines in 2 files changed: 5 ins; 4 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/5396.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5396/head:pull/5396 PR: https://git.openjdk.java.net/jdk/pull/5396