< prev index next >

src/java.base/share/classes/java/time/ZoneId.java

Print this page
*** 160,15 ***
   * However, any call to {@code getRules} will fail with {@code ZoneRulesException}.
   * This approach is designed to allow a {@link ZonedDateTime} to be loaded and
   * queried, but not modified, on a Java Runtime with incomplete time-zone information.
   * <p>
   * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
!  * class; programmers should treat instances that are
!  * {@linkplain #equals(Object) equal} as interchangeable and should not
!  * use instances for synchronization, or unpredictable behavior may
-  * occur. For example, in a future release, synchronization may fail.
-  * The {@code equals} method should be used for comparisons.
   *
   * @implSpec
   * This abstract sealed class permits two implementations, both of which are immutable and
   * thread-safe. One implementation models region-based IDs, the other is {@code ZoneOffset}
   * modelling offset-based IDs. This difference is visible in serialization.
--- 160,13 ---
   * However, any call to {@code getRules} will fail with {@code ZoneRulesException}.
   * This approach is designed to allow a {@link ZonedDateTime} to be loaded and
   * queried, but not modified, on a Java Runtime with incomplete time-zone information.
   * <p>
   * This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
!  * class; programmers should treat instances that are {@linkplain #equals(Object) equal}
!  * as interchangeable and should not use instances for synchronization, mutexes, or
!  * with {@linkplain java.lang.ref.Reference object references}.
   *
   * @implSpec
   * This abstract sealed class permits two implementations, both of which are immutable and
   * thread-safe. One implementation models region-based IDs, the other is {@code ZoneOffset}
   * modelling offset-based IDs. This difference is visible in serialization.
< prev index next >