Reminder about draft specs

Chris Hegarty chris.hegarty at
Fri Nov 8 17:11:02 UTC 2019


> On 8 Nov 2019, at 15:28, Gavin Bierman <gavin.bierman at> wrote:
> ...
> <>
Looks good.  A comment relating to Serialization, from section 8.10.1 - Record Components.

 As all record types are subclasses of the class java.lang.Record which in turn implements the interface, it is necessary to …

This is not true. j.i.Record does not implement Serializable. Not all records are serializable.

A record may be serializable, if it implements the interface, but it is not required. For example,

  record SerializableFoo (int x, int y) implements { }

Additionally, I thought that all serialization related magic members were to be restricted from being record component names ( they are just too odd and potentially confusing ) ? The spec has some, but not all. The complete list ( of 7 ) is:  writeObject, readObject, readObjectNoData, writeReplace, readResolve, serialVersionUID, serialPersistentFields.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amber-spec-experts mailing list