Reminder about draft specs

Gavin Bierman gavin.bierman at oracle.com
Sat Nov 9 10:50:59 UTC 2019


Yes, that needs correcting. Let me tweak - will send another message when it’s completed.

Thanks,
Gavin

> On 8 Nov 2019, at 17:11, Chris Hegarty <chris.hegarty at oracle.com> wrote:
> 
> Gavin,
> 
>> On 8 Nov 2019, at 15:28, Gavin Bierman <gavin.bierman at oracle.com <mailto:gavin.bierman at oracle.com>> wrote:
>> 
>> ...
>> http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191031/specs/records-jls.html <http://cr.openjdk.java.net/~gbierman/jep359/jep359-20191031/specs/records-jls.html>
> 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 java.io.Serializable, 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 java.io <http://java.io/>.Serializable interface, but it is not required. For example,
> 
>   record SerializableFoo (int x, int y) implements java.io.Serializable { }
> 
> 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.
> 
> -Chris.
> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20191109/f6a079f1/attachment-0001.html>


More information about the amber-spec-experts mailing list