[threeten-dev] TzdbZonRulesProvider and providerBind
Xueming Shen
xueming.shen at oracle.com
Tue Jan 29 08:15:46 PST 2013
Heads up.
I'm adding an additional "alias mapping" section at the end of the
tzdb.jar for
the j.u.TimeZone migration (to use tzdb.jar). There are internal jdk
classes need
the real alias mapping table to get all those "names" for those alias
time zones.
(JSR310 may also prefer to have the alias info somewhere, like the tz
text parsing,
but I'm not exposing it right now)
http://cr.openjdk.java.net/~sherman/jdk8_threeten/tz_share/make/tools/src/build/tools/tzdb/TzdbZoneRulesCompiler.java.sdiff.html
http://cr.openjdk.java.net/~sherman/jdk8_threeten/tz_share/src/share/classes/sun/util/calendar/ZoneInfoFile.java.html
I still keep the alias names in the regionId array, only add the
indexing table
at the end, so we don't have to add those alias names into the region
list and
jsr310 loader can probably just ignore the rest. There are about 140+
aliases.
-Sherman
On 1/29/13 2:30 AM, Stephen Colebourne wrote:
> On 29 January 2013 07:54, Xueming Shen <xueming.shen at oracle.com> wrote:
>> A slim down version of the tzdbProvider.java
>>
>> http://cr.openjdk.java.net/~sherman/jdk8_threeten/tzdbProvider
> There should be a blank line before the constructor.
>
> The "Specification for implementors" section is irrelevent on a
> non-public class. The class is also not immutable.
>
> The map of versions shoud use Collections.singletonMap or emptyMap
> (note that this requires changing the specification in
> ZoneRulesProvider)
>
> I think that the version should probably be added to the toString() -
> "TZDB[2013a]"
>
> A comment should be added noting that only the latest version is being used.
>
>
> In general, this is a good simplification.
>
> Stephen
More information about the threeten-dev
mailing list