-
Sub-task
-
Resolution: Delivered
-
P4
-
25
The serialized `Class` objects for several classes in the `java.time` package are incompatible between JDK 25 and previous versions. The affected classes include `LocalDate`, `YearMonth`, `MonthDay`, and `HijrahDate`. If a `Class` object for one of these classes is serialized on a previous version and is deserialized on JDK 25, or vice-versa, `InvalidClassException` will be thrown.
Note that the incompatibility exists with `Class` objects but not instances of these classes. Serializing the `Class` object, for example by using:
`writeObject(LocalDate.class)`
will encounter the incompatibility.
However, Serializing an instance through
`writeObject(LocalDate.now())`
is compatible.
The issue will be examined for a future update release.
Note that the incompatibility exists with `Class` objects but not instances of these classes. Serializing the `Class` object, for example by using:
`writeObject(LocalDate.class)`
will encounter the incompatibility.
However, Serializing an instance through
`writeObject(LocalDate.now())`
is compatible.
The issue will be examined for a future update release.