[threeten-dev] TzdbZoneRulesCompiler

Xueming Shen xueming.shen at oracle.com
Fri Dec 14 15:25:13 PST 2012


On 12/14/12 2:56 PM, Stephen Colebourne wrote:
>> Opinion?  the surgery is too big?
> Taking a step back, I think that ZoneRules probably does not need to
> be an interface. There are only two sensible implementations - single
> offset and complex, as per StandardZoneRules.

One benefit of having ZoneRules to be interface is that other 
implementation does
not have to have their implementation bundled with the existing 
implementation.
I was hoping we can get rid of the ZOTR as well, since it's kinda 
specific to how the
tzdb is defined. But if other implementation will have to deal with ZOT 
and ZOTR
anyway, it might not be too bad that they have to build the rule based 
on the
specified constructor/factory method (I'm sure you want to make sure the 
class
ZoneRules to be final as well).

Yes, have a concrete ZoneRules with public create and access methods 
definitely
make the life of the compiler tool easier.

-Sherman
>
> If we made this change, then StandardZoneRules and the rules inside
> ZoneOffset would merge inside ZoneRules. Then, all the serialization
> would stay in the core. The tool would simply create the necessary
> items to pass to the standard public factory on ZoneRules.
>
> So, what you've done makes sense given where we are, but I think there
> is a better option.
>
>





More information about the threeten-dev mailing list