Please review clarification of java.time serialized form

Stephen Colebourne scolebourne at
Thu Sep 12 14:16:49 UTC 2013

On 12 September 2013 14:49, roger riggs <roger.riggs at> wrote:
>> Some classes have had transient added, while others haven't. For
>> example LocalDate doesn't use transient. Since the instance fields are
>> never directly serialized, but do appear in the serialized form,
>> perhaps they should be marked as transient?
> Marking as transient will make them disappear from the serialized form.
> The comments on the individual fields seemed useful to document the data
> in the stream and they were kept when the writeReplace method documented
> writing them to the stream.    In other cases the writeReplace method refers
> to the <get> method that returned the value instead of a field.

Most consistent would be to always refer to the get method. The
comment is useful as is, but sometimes you get a byte in one place and
a short in another for example (LocalDate) which might be confusing.

>> The byte code numbers for MinguoDate and ThaiBuddhistDate are now out
>> of line as you removed the ERA constants in Ser.
> How should that be fixed, restore the gaps or re-order?

At this stage, the docs should be updated and the Ser constants kept packed.


More information about the core-libs-dev mailing list