RFR: 8371732: [redo] Change java.time month/day field types to 'byte'

Roger Riggs rriggs at openjdk.org
Thu Nov 13 21:16:29 UTC 2025


On Wed, 12 Nov 2025 18:29:52 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> Redo change (8371732) that failed when the updated class objects were incompatible.
> The fields of classes are changed to allow a more compact form of storage.
> 
> To ensure compatibility of the class objects, the fields are explicitly declared in SerialPersistentFields with the original field types.
> The fields are marked `transient` to indicate the field declarations are not used for serialization.
> The affected classes are java.time.LocalDate, MonthDay, and YearMonth.
> Tests are added to verify the types and names of serialized fields of each class.
> 
> HijrahDate only changes the field types, the fields are transient and there is no change to the serialized from of the HijrahDate.class object.

Please also review the CSR [JDK-8371816](https://bugs.openjdk.org/browse/JDK-8371816)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28274#issuecomment-3529734697


More information about the core-libs-dev mailing list