Trust final fields in records

Remi Forax forax at univ-mlv.fr
Fri Jun 12 11:26:54 UTC 2020


----- Mail original -----
> De: "Brian Goetz" <brian.goetz at oracle.com>
> À: "Chris Hegarty" <chris.hegarty at oracle.com>
> Cc: "amber-dev" <amber-dev at openjdk.java.net>, "hotspot-runtime-dev" <hotspot-runtime-dev at openjdk.java.net>,
> "valhalla-dev" <valhalla-dev at openjdk.java.net>
> Envoyé: Vendredi 12 Juin 2020 12:57:50
> Objet: Re: Trust final fields in records

> If the fields cannot be made accessible, this means that 3rd party serialization
> frameworks will choke on records, right?

if the library asks for an empty constructor and then fill all the fields by reflection, yes,
if it is using the canonical constructor no.

Rémi

> 
> Sent from my iPad
> 
>> On Jun 12, 2020, at 5:10 AM, Chris Hegarty <chris.hegarty at oracle.com> wrote:
>> 
>> 
>> 
>>> On 12 Jun 2020, at 02:52, Mandy Chung <mandy.chung at oracle.com> wrote:
>>> 
>>> Hi Christoph,
>>> 
>>> I can sponsor your patch.  I create
>>> https://bugs.openjdk.java.net/browse/JDK-8247444.
>> 
>> This is great. I remember thinking (saying?) similar when we settled on record
>> serialization not needing to muck around with field stuffing (among the
>> motivating factors for how records deserialize). This is a great step forward,
>> nice to see it progressing.
>> 
> > -Chris.


More information about the valhalla-dev mailing list