[threeten-dev] Review for #198 Chrono Initialization and Service Loader
Roger Riggs
Roger.Riggs at oracle.com
Wed Jan 9 09:03:18 PST 2013
Please review this fix for the issue with Chronology initialization and
the ServiceLoader.
http://cr.openjdk.java.net/~rriggs/webrev-serviceloader/
The initialization of the lists of Chronologies is deferred until it is
needed
for the list of available Chronologies or to get a Chronology by name.
The change exposed an issue with caching calendars that may be thread
context
specific which is not yet resolved. To support extended Calendars from
application specific
classloaders, caching should be limited to those in the bootclassloader.
Additional code will be needed in the Chrono.of() and
Chrono.getAvailableChronologies()
methods to use the Thread's context and look for additional Chronologies.
For client runtimes, this may be not necessary or useful but for server use
the application server runtime may need to be able to support
application specific
calendar implementations.
Tests for the serviceloader and extensible calendars have been added
using the
Coptic calendar as a test calendar.
Opinions?
--
Thanks, Roger
Oracle Java Platform Group
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment
More information about the threeten-dev
mailing list