Updated Draft specs for JEP 359 (Records)

Brian Goetz brian.goetz at oracle.com
Thu Oct 31 14:45:37 UTC 2019


Yes, they would clash, and that’s the motivation for this rule (which I still like.)  

> On Oct 31, 2019, at 10:42 AM, Srikanth <srikanth.adayapalam at oracle.com> wrote:
> 
> 
> 
> 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