[threeten-dev] default ZoneRulesProvider and the system property for it.
Roger Riggs
Roger.Riggs at oracle.com
Fri Jan 25 14:45:31 PST 2013
Hi Sherman,
In TzdbZoneRulesProvider.java can you remove this, it looks ineffective
since
the libDir is not saved or re-used and is not updated if an exception
occurs.
159: "try {
libDir = FileSystems.getDefault().getPath(libDir).toRealPath().toString();
} catch(Exception e) {}"
The rest looks fine.
Roger
On 1/25/2013 5:31 PM, Xueming Shen wrote:
> 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
>>
>
--
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