JDK-8367032 : Release Note: Regression in Serialization of LocalDate Class Objects
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.io:serialization
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2025-09-07
  • Updated: 2025-09-19
  • Resolved: 2025-09-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25Resolved
Description
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.