Updated Draft specs for JEP 359 (Records)
Srikanth
srikanth.adayapalam at oracle.com
Thu Oct 31 14:42:01 UTC 2019
On 31/10/19 7:59 PM, Maurizio Cimadamore wrote:
> Related to the earlier discussion on forbidden record members - how is
> this section still relevant?
>
> "It is a compile-time error for a record declaration to declare a
> record component with the name |clone|, |finalize|, |getClass|,
> |hashCode|, |notify|, |notifyAll|, |readObjectNoData|, |readResolve|,
> |serialPersistentFields|, |serialVersionUID|, |toString|, |wait|, or
> |writeReplace|."
>
> Chris says that the serialization spec ignores all the
> serialization-related methods if they appear inside a record; should
> we lift the restrictions?
When I was going through the spec draft, I rationalized this to myself
by saying the synthesized accessor methods would very likely clash with
jlO methods. Isn't that the case ??
Srikanth
More information about the amber-dev
mailing list