-
Bug
-
Resolution: Fixed
-
P2
-
8
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8031208 | 9 | Roger Riggs | P2 | Closed | Fixed | b01 |
JDK-8031284 | 8u5 | Roger Riggs | P2 | Resolved | Fixed | b03 |
The JSR 310 EG is adopting the value-type language defined by the Lambda Expert Group.
This language reinforces the definition of value-types and correct usage with respect to object identity.
"This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
class; use of identity-sensitive operations (including reference equality
({@code ==}), identity hash code, or synchronization) on instances of
{@code this class} may have unpredictable results and should be avoided."
The classes with this behavior are:
- LocalDate, LocalTime, LocalDateTime, ZonedDateTime
- OffsetTime, OffsetDateTime
- JapaneseDate, MinguoDate, HijrahDate, ThaiBuddhist
- Instant, Duration, Period
- MonthDay, YearMonth, Year
- ZoneId, ZoneOffset
This language reinforces the definition of value-types and correct usage with respect to object identity.
"This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
class; use of identity-sensitive operations (including reference equality
({@code ==}), identity hash code, or synchronization) on instances of
{@code this class} may have unpredictable results and should be avoided."
The classes with this behavior are:
- LocalDate, LocalTime, LocalDateTime, ZonedDateTime
- OffsetTime, OffsetDateTime
- JapaneseDate, MinguoDate, HijrahDate, ThaiBuddhist
- Instant, Duration, Period
- MonthDay, YearMonth, Year
- ZoneId, ZoneOffset
- backported by
-
JDK-8031284 Add value-type notice to java.time classes
-
- Resolved
-
-
JDK-8031208 Add value-type notice to java.time classes
-
- Closed
-
- relates to
-
JDK-8028816 Add value-type notice to Optional* classes
-
- Closed
-