RFR: 8283681: Improve ZonedDateTime offset handling [v3]
Claes Redestad
redestad at openjdk.java.net
Fri Mar 25 22:41:56 UTC 2022
On Fri, 25 Mar 2022 17:27:32 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Override ZoneOffset::normalized, cache ZoneOffset::getRules, revert change to add 2nd parameter to ZoneId::getOffset
>
> test/micro/org/openjdk/bench/java/time/GetYearBench.java line 66:
>
>> 64: private TimeZone UTC = TimeZone.getTimeZone("UTC");
>> 65:
>> 66: private TimeZone LONDON = TimeZone.getTimeZone("Europe/London");
>
> Nit: No need to use `TimeZone.getTimeZone()` here (and later convert them to `toZoneId()`). `ZoneId.of()` should suffice.
It was somewhat intentional to do it like way in this microbenchmark experiment to check that the `toZoneId()` doesn't cause surprises and ideally that it doesn't cost anything.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7957
More information about the core-libs-dev
mailing list