I guess they are allowed to do that, its not listed as a 'standard'
sysprop in 
http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getProperties%28%29

But its just plain dirty

On Thu, Mar 22, 2012 at 6:20 PM, Dawid Weiss
<[email protected]> wrote:
> Yes, I was promising a beer to anybody who knew that before that
> invariant was in place -- see my comment here:
>
> https://issues.apache.org/jira/browse/LUCENE-3847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222013#comment-13222013
>
> Dawid
>
> On Thu, Mar 22, 2012 at 11:15 PM, Robert Muir <[email protected]> wrote:
>> Its way worse than i thought:
>>
>>  public static void main(String args[]) throws Exception {
>>    System.out.println("tz:" + System.getProperty("user.timezone"));
>>    TimeZone old = TimeZone.getDefault();
>>    System.out.println("tz:" + System.getProperty("user.timezone"));
>>  }
>>
>> prints:
>>
>> tz:
>> tz:America/New_York
>>
>> So even calling TimeZone.getDefault() (and doing nothing with it) is
>> enough to change the sysprop!
>>
>> On Thu, Mar 22, 2012 at 6:12 PM, Robert Muir <[email protected]> wrote:
>>>>
>>>> I didn't inspect in detail what TimeZone does in standard JDK (if it
>>>> resets the property on each setDefault or only if it's empty?). Feel
>>>> free to file an issue -- we may look into it in the future. I don't
>>>> think this is that crucial (?).
>>>>
>>>
>>> sorry i used locales where i should have used tzs too, but you get the idea 
>>> :)
>>> whether it resets or only if its empty, its the same problem for us
>>> though, its something different than it was before (it was empty, now
>>> it wont be)
>>>
>>>
>>> --
>>> lucidimagination.com
>>
>>
>>
>> --
>> lucidimagination.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to