RFR: 8266846: Add java.time.InstantSource [v2]
Naoto Sato
naoto at openjdk.java.net
Tue May 18 21:07:42 UTC 2021
On Mon, 17 May 2021 17:19:19 GMT, Stephen Colebourne <scolebourne at openjdk.org> wrote:
>> 8266846: Add java.time.InstantSource
>
> Stephen Colebourne has updated the pull request incrementally with one additional commit since the last revision:
>
> 8266846: Add java.time.InstantSource
src/java.base/share/classes/java/time/Instant.java line 275:
> 273: */
> 274: public static Instant now() {
> 275: return Clock.currentInstant();
Copyright year should change to 2021 for this change.
test/jdk/java/time/test/java/time/TestInstantSource.java line 59:
> 57: assertTrue(Math.abs(testMillis - millis) < 1000);
> 58: assertTrue(Math.abs(testInstantMillis - millis) < 1000);
> 59: assertSame(test.equals(InstantSource.system());
')' is missing. Couple other locations.
test/jdk/java/time/test/java/time/TestInstantSource.java line 86:
> 84: assertEquals(test.instant(), instant);
> 85: assertSame(test.equals(InstantSource..fixed(instant));
> 86: assertEquals(test.hashCode(), InstantSource..fixed(instant).hashCode());
Not sure this would compile.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4016
More information about the core-libs-dev
mailing list