Re: RFR: 8266846: Add java.time.InstantSource [v6]

2021-06-03 Thread Naoto Sato
On Thu, 3 Jun 2021 20:59:24 GMT, Stephen Colebourne 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 Marked as reviewed by naoto (Re

Re: RFR: 8266846: Add java.time.InstantSource [v6]

2021-06-03 Thread Joe Darcy
On Thu, 3 Jun 2021 20:59:24 GMT, Stephen Colebourne 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 Marked as reviewed by darcy (Re

Re: RFR: 8266846: Add java.time.InstantSource [v6]

2021-06-03 Thread Roger Riggs
On Thu, 3 Jun 2021 20:59:24 GMT, Stephen Colebourne 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 Marked as reviewed by rriggs (R

Re: RFR: 8266846: Add java.time.InstantSource [v6]

2021-06-03 Thread Stephen Colebourne
> 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 - Changes: - all: https://git.openjdk.java.net/jdk/pull/4016/files - new: https://git.

Re: RFR: 8266846: Add java.time.InstantSource [v5]

2021-06-01 Thread Roger Riggs
On Sun, 30 May 2021 00:49:56 GMT, Stephen Colebourne 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 Marked as reviewed by rriggs (

Re: RFR: 8266846: Add java.time.InstantSource [v5]

2021-06-01 Thread Naoto Sato
On Sun, 30 May 2021 00:49:56 GMT, Stephen Colebourne 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 Looks good to me. ---

Re: RFR: 8266846: Add java.time.InstantSource [v5]

2021-05-29 Thread Stephen Colebourne
> 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 - Changes: - all: https://git.openjdk.java.net/jdk/pull/4016/files - new: https://git.

Re: RFR: 8266846: Add java.time.InstantSource [v4]

2021-05-19 Thread Naoto Sato
On Wed, 19 May 2021 21:58:08 GMT, Stephen Colebourne 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 I believe that the default exe

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-19 Thread Stephen Colebourne
On Tue, 18 May 2021 23:18:42 GMT, Stephen Colebourne 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 I've made the obvious changes

Re: RFR: 8266846: Add java.time.InstantSource [v4]

2021-05-19 Thread Stephen Colebourne
> 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 - Changes: - all: https://git.openjdk.java.net/jdk/pull/4016/files - new: https://git.

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-19 Thread Rémi Forax
On Tue, 18 May 2021 23:18:42 GMT, Stephen Colebourne 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 my bad - PR: htt

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-19 Thread Naoto Sato
On Tue, 18 May 2021 23:18:42 GMT, Stephen Colebourne 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 The Error was caused by the mo

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-19 Thread Rémi Forax
On Tue, 18 May 2021 23:18:42 GMT, Stephen Colebourne 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 It's a side effect of JEP 403,

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-19 Thread Naoto Sato
On Tue, 18 May 2021 23:18:42 GMT, Stephen Colebourne 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 Another test started failing w

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-19 Thread Daniel Fuchs
On Wed, 19 May 2021 08:41:08 GMT, Peter Levart wrote: >> This isn't my logic - it is existing code that has been moved. I'm not a fan >> of infinite retry loops as the can hang the system. But I'm happy to change >> it to work that way if there is a consensus to do so. > > I see the localOffset

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-19 Thread Naoto Sato
On Tue, 18 May 2021 23:22:49 GMT, Stephen Colebourne wrote: >> 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.has

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-19 Thread Naoto Sato
On Tue, 18 May 2021 23:18:42 GMT, Stephen Colebourne 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 test/jdk/java/time/test/java/t

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-19 Thread Peter Levart
On Tue, 18 May 2021 23:14:53 GMT, Stephen Colebourne wrote: >> src/java.base/share/classes/java/time/Clock.java line 487: >> >>> 485: // it more unlikely to hit the 1ns in the future condition. >>> 486: localOffset = System.currentTimeMillis()/1000 - 1024; >>> 487: >>

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-18 Thread Stephen Colebourne
On Tue, 18 May 2021 21:04:18 GMT, Naoto Sato wrote: >> Stephen Colebourne has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8266846: Add java.time.InstantSource > > test/jdk/java/time/test/java/time/TestInstantSource.java line 86: > >> 84

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-18 Thread Stephen Colebourne
On Sun, 16 May 2021 07:39:21 GMT, Peter Levart wrote: >> 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/Clock.java line 487: > >> 485:

Re: RFR: 8266846: Add java.time.InstantSource [v3]

2021-05-18 Thread Stephen Colebourne
> 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 - Changes: - all: https://git.openjdk.java.net/jdk/pull/4016/files - new: https://git.

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-18 Thread Naoto Sato
On Mon, 17 May 2021 17:19:19 GMT, Stephen Colebourne 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/ja

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-18 Thread Peter Levart
On Mon, 17 May 2021 17:19:19 GMT, Stephen Colebourne 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 Changes requested by plevart (

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-17 Thread Roger Riggs
On Mon, 17 May 2021 17:13:58 GMT, Stephen Colebourne wrote: >> src/java.base/share/classes/java/time/Clock.java line 128: >> >>> 126: * Implementations should implement {@code Serializable} wherever >>> possible and must >>> 127: * document whether or not they do support serialization. >>> 1

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource FWIW, if there is a need to access `VM.getNanoTimeAdjustment(localOffset)` then that should be a separate issue. I don't personally think it would be approved given Valhalla is coming.

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-17 Thread Stephen Colebourne
On Mon, 17 May 2021 14:30:20 GMT, Roger Riggs wrote: >> 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/Clock.java line 128: > >> 126: *

Re: RFR: 8266846: Add java.time.InstantSource [v2]

2021-05-17 Thread Stephen Colebourne
> 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 - Changes: - all: https://git.openjdk.java.net/jdk/pull/4016/files - new: https://git.

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Mon, 17 May 2021 14:13:06 GMT, Roger Riggs wrote: >> 8266846: Add java.time.InstantSource > > src/java.base/share/classes/java/time/InstantSource.java line 165: > >> 163: */ >> 164: static InstantSource fixed(Instant fixedInstant) { >> 165: return Clock.fixed(fixedInstant, Zo

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Mon, 17 May 2021 14:04:24 GMT, Roger Riggs wrote: >> 8266846: Add java.time.InstantSource > > src/java.base/share/classes/java/time/InstantSource.java line 36: > >> 34: * Instances of this interface are used to find the current instant. >> 35: * As such, an {@code InstantSource} can be used

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Ralph Goers
On Mon, 17 May 2021 07:50:22 GMT, Stephen Colebourne wrote: >> 8266846: Add java.time.InstantSource > > It would good to get confirmation in the review from @dholmes-ora or Mark > Kralj-Taylor that my changes to the precise system clock are correct. > Specifically, I moved the code from instan

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Roger Riggs
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource Changes requested by rriggs (Reviewer). src/java.base/share/classes/java/time/Clock.java line 128: > 126: * Implementations should implement {@code Serializable} wherever > possible and must >

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource It would good to get confirmation in the review from @dholmes-ora or Mark Kralj-Taylor that my changes to the precise system clock are correct. Specifically, I moved the code from instance to st

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Rémi Forax
On Mon, 17 May 2021 07:31:45 GMT, Stephen Colebourne wrote: >> src/java.base/share/classes/java/time/InstantSource.java line 93: >> >>> 91: * @since 17 >>> 92: */ >>> 93: public interface InstantSource { >> >> Should not we add `@FunctionalInterface`? I can easily imagine this >> interface

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Sat, 15 May 2021 21:32:54 GMT, Ralph Goers wrote: >> 8266846: Add java.time.InstantSource > > Can you possibly find a way that this can be used in a garbage free manner? > Providing a MutableInstant interface that allows the Instant object to be > provided and have its values set by a curr

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-17 Thread Stephen Colebourne
On Sat, 15 May 2021 20:53:28 GMT, Istvan Neuwirth wrote: >> 8266846: Add java.time.InstantSource > > src/java.base/share/classes/java/time/InstantSource.java line 93: > >> 91: * @since 17 >> 92: */ >> 93: public interface InstantSource { > > Should not we add `@FunctionalInterface`? I can ea

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-15 Thread Ralph Goers
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource Can you possibly find a way that this can be used in a garbage free manner? Providing a MutableInstant interface that allows the Instant object to be provided and have its values set by a curre

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-15 Thread Istvan Neuwirth
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource src/java.base/share/classes/java/time/InstantSource.java line 93: > 91: * @since 17 > 92: */ > 93: public interface InstantSource { Should not we add `@FunctionalInterface`? I can easily imagi

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-15 Thread Michael Hixson
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource src/java.base/share/classes/java/time/InstantSource.java line 68: > 66: * @implSpec > 67: * This interface must be implemented with care to ensure other classes > operate correctly. > 68: * A

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-15 Thread Stephen Colebourne
On Fri, 14 May 2021 07:19:03 GMT, Anthony Vanelverdinghe wrote: >> 8266846: Add java.time.InstantSource > > src/java.base/share/classes/java/time/Clock.java line 513: > >> 511: * {@link System#currentTimeMillis()} or equivalent. >> 512: */ >> 513: static final class SystemInstantS

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-15 Thread Naoto Sato
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource src/java.base/share/classes/java/time/Clock.java line 2: > 1: /* > 2: * Copyright (c) 2012, 2019, 2021, Oracle and/or its affiliates. All > rights reserved. `2019, ` should be removed. src/ja

RFR: 8266846: Add java.time.InstantSource

2021-05-15 Thread Stephen Colebourne
8266846: Add java.time.InstantSource - Commit messages: - 8266846: Add java.time.InstantSource - 8266846: Add java.time.InstantSource Changes: https://git.openjdk.java.net/jdk/pull/4016/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4016&range=00 Issue: https://bugs

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-15 Thread Anthony Vanelverdinghe
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource A nice addition to the JDK, thanks for taking this on. src/java.base/share/classes/java/time/Clock.java line 114: > 112: * provides access to the current instant, and does not provide access >