RFR: JDK-8042369 Remove duplicated java.time classes in build.tools.tzdb

Xueming Shen xueming.shen at oracle.com
Mon May 5 06:16:20 UTC 2014


Please help review the change for #8042369

Issue: https://bugs.openjdk.java.net/browse/JDK-8042369
Webrev: http://cr.openjdk.java.net/~sherman/8042369/webrev

In jdk8 we had to duplicate dozen java.time classes in build.tools to build the timezone data
for the new JSR310 timezone data compiler, which uses the new jdk8 java.time classes (these
classes don't exit in the < 8 boot jdk). JDK9 has switched to use the jdk8 as the boot jdk,  so
most of these duplicated classes are no longer needed, with ZoneRules as the only exception.
The ZoneRules is still needed to help the tzdb compiler to output the tzdb data in the
serialization forms of those transitions and rules. The proposed change here is to remove
those unneeded duplicated classes.

I also took the opportunity to re-organize/re-wrote the "builder" classes to have a faster, simpler
and and straightforward implementation, with the goal of migrating it into a second default
ZoneRulesProvider later to plug it into jdk, so jdk/jre can uses the tzdb source data from the
IANA directly. One of the benefits of such a provider is that the end user may just drop the latest
timezone data file into the jdk/jre and go, without waiting for the latest timezone binary bits from

Here is the webrev for the idea

The only disadvantage appears to be the possible "slowdown" of startup time because of
the reading and compiling of the 200k tzdb source data...(we need another new "bridge" for
  j.u.TimeZone, if we go with this direction)


More information about the core-libs-dev mailing list