Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8367031 Regression in serialization of LocalDate class objects
  3. JDK-8367032

Release Note: Regression in Serialization of LocalDate Class Objects

XMLWordPrintable

      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.

            rriggs Roger Riggs
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: