[threeten-dev] default ZoneRulesProvider and the system property for it.

Xueming Shen xueming.shen at oracle.com
Fri Jan 25 14:31:21 PST 2013


webrev has been updated

(1) used class.newInstance() directly
(2) added a check for the possible duplicated provider installation, such
      as the provider jar is either in the extension dir or the 
classpath, and
      it is being specified via -Djava.time.zone.DefaultZoneRulesProvider
     (it appears the "loaded" was an empty list, never got updated in old
     code)
(3) took out the java.time.zone.tzdbjar property support, as agreed.

The the specified provider is still being loaded inside doPrivileged block
for now. There is an ongoing discussion on this one, may take it out
of the block later.

-Sherman

On 1/25/13 6:12 AM, Roger Riggs wrote:
> Hi Sherman,
>
> Why the use of reflection to instantiate the provider?  Isn't 
> class.newInstance() sufficient.
>
> Also, is it standard practice to put these inside doPrivileged? It 
> would seem
> to be a security risk.  I would want the constructor to have to do its 
> own doPriv
> to get elevated access to files, etc.
>
> Thanks, Roger
>
>
> On 1/25/2013 3:08 AM, Xueming Shen wrote:
>> Stephen,
>>
>> Here is the webrev to define the default zone-rule provider and 
>> introduce
>> in the system property java.time.zone.DefaultZoneRulesProvider.
>>
>> http://cr.openjdk.java.net/~sherman/jdk8_threeten/zrProvider
>>
>> -sherman
>



More information about the threeten-dev mailing list