Please review clarification of java.time serialized form
scolebourne at joda.org
Thu Sep 12 00:56:37 UTC 2013
HijrahChronology mixes "final transient" and "transient final". They
should be consistently one way or the other files should be checked,
and I think there is an official coding standard for this).
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?
The byte code numbers for MinguoDate and ThaiBuddhistDate are now out
of line as you removed the ERA constants in Ser.
Otherwise looks like a good improvement.
On 6 September 2013 20:06, roger riggs <roger.riggs at oracle.com> wrote:
> The specification of the serialized-form of the java.time classes has
> improved in response to issue 8024164: JSR310 serialization should be
> described in detail
> - Add descriptions in the Ser classes of the mapping between the type bytes
> corresponding serialized classes.
> - Add missing specification of the serial data to writeReplace methods
> - Add missing readResolve methods that prevent deserialization from
> improperly formatted streams.
> - The Era that are Enum's do not need customized serialization;
> remove unused writeReplace, writeExternal, and readExternal methods,
> remove unused java.time.chrono.Ser type codes for *Eras and renumber.
> Webrev: http://cr.openjdk.java.net/~rriggs/webrev-serial-8024164/
> Javadoc: http://cr.openjdk.java.net/~rriggs/javadoc-serial-8024164/
> Please review and comment.
> Thanks, Roger
More information about the core-libs-dev