TimeZone.setDefault изменяется в JDK6

Я только что заметил, что JDK 6 имеет другой подход к установке TimeZone по умолчанию, чем JDK5.

Ранее новое значение по умолчанию сохранялось бы в локальной переменной потока. В JDK6 (я только что рассмотрел 1.6.0.18) реализация изменилась, поэтому, если пользователь может записать в свойство «user.timezone» или если не установлен SecurityManager, часовой пояс изменяется во всей VM! В противном случае происходит локальное изменение потока.

Я ошибся? Это, кажется, довольно радикальное изменение, и я не смог найти в Интернете ничего об этом.

Вот код JDK6:

 private static boolean hasPermission() {
  boolean hasPermission = true;
  SecurityManager sm = System.getSecurityManager();
  if (sm != null) {
   try {
    sm.checkPermission(new PropertyPermission("user.timezone", "write"));
   } catch (SecurityException e) {
    hasPermission = false;
   }
  }
  return hasPermission;
 }

 /**
  * Sets the <code>TimeZone</code> that is
  * returned by the <code>getDefault</code> method.  If <code>zone</code>
  * is null, reset the default to the value it had originally when the
  * VM first started.
  * @param zone the new default time zone
  * @see #getDefault
  */
 public static void setDefault(TimeZone zone)
 {
  if (hasPermission()) {
   synchronized (TimeZone.class) {
    defaultTimeZone = zone;
    defaultZoneTL.set(null);
   }
  } else {
   defaultZoneTL.set(zone);
  }
 }

в то время как раньше (в JDK5) это было просто:

 /**
  * Sets the <code>TimeZone</code> that is
  * returned by the <code>getDefault</code> method.  If <code>zone</code>
  * is null, reset the default to the value it had originally when the
  * VM first started.
  * @param zone the new default time zone
  * @see #getDefault
  */
 public static synchronized void setDefault(TimeZone zone)
 {
  defaultZoneTL.set(zone);
 }

Ответы на вопрос(3)

Ваш ответ на вопрос