Hello,
On 11/4/2019 1:27 PM, Florian Weimer wrote:
* Vicente Romero:
Please review the draft of the CSR for Core-libs support for records at [1]
Thanks,
Vicente
[1] https://bugs.openjdk.java.net/browse/JDK-8233436
I would have expected something regarding serialization in the
description of java.lang.Record.
Right now, it appears to be possible to have a record implement
java.io.Serializable, and serialization will appear to work, but
because the names of the implicitly generated private fields are not
specified, it is not portable across compilers and even compiler
versions.
There is a separate serialization spec update for records that has been
discussed on the amber lists.
It isn't unreasonable for java.lang.Record to make some mention of the
special treatment by serialization. (As a point of reference,
java.lang.Enum does *not* reference the special handling of enums of
serialization.)
I think a reference to the serialization spec in java.lang.Record would
suffice.
Cheers,
-Joe