Hi Daniel,

On 02/23/2015 06:41 PM, Daniel Fuchs wrote:
Hi,

Please find below a small patch for
8073394: Clock.systemUTC() should return a constant

http://cr.openjdk.java.net/~dfuchs/webrev_8073394/webrev.00/

best regards,

-- daniel


What about the following idea:

- create a (maybe still package-private) instance method ZoneId.getSystemClock() and cache the per-ZoneId Clock instance inside the ZoneId. - Clock.system(ZoneId) static method is then just delegating to ZoneId.getSystemClock(). - Similarly Clock.systemDefaultZone() can just return ZoneId.defaultSystem().getSystemClock(). - Similarly Clock.systemUTC() can just return ZoneOffset.UTC.getSystemClock().

Or do we just want to cache systemUTC() Clock here?

Peter

Reply via email to