[threeten-dev] [threeten-develop] DateTimeFormatters factory consolidation #210
Stephen Colebourne
scolebourne at joda.org
Tue Jan 29 07:01:38 PST 2013
On 29 January 2013 14:53, Roger Riggs <Roger.Riggs at oracle.com> wrote:
> On 1/28/2013 6:03 PM, Stephen Colebourne wrote:
> It might be worth having an inner class lazy load for some/all of the
> constants. The RFC constant will be slow to create with its maps and
> rarely used. The other constants might be better having their startup
> delayed as well.
>
> I would agree about delaying the initialization if possible but
> with static variables, I don't think the initialization can be lazy.
True. We'll have to test startup and other performance at some point,
but hopefully this won't be a big issue.
> It might be possible for the implementation to instantiate a
> DateTimeFormatter instance
> with only an enum of its format but not initialize the fields. I'll take a
> look at that after
> other tasks.
It could be done like the week or localized printer/parser using
package-scoped methods. Whether it is worth worrying about is another
matter.
> It also occurs to me that some folks would benefit of documentation of the
> pattern
> used. It might provoke better recognition in addition to the name. But it
> is not always
> possible. Thing for a future doc update perhaps.
I took the pattern letter style documentation out as the pattern
letters were not totally clear. They could be added back as guidance
rather than spec.
Stephen
More information about the threeten-dev
mailing list