ObjectOutputStream and Record
Remi Forax
forax at univ-mlv.fr
Sat Nov 30 23:48:24 UTC 2019
Hi all,
in ObjectOutputStream.writeOrdinaryObject, there is a weird code:
final boolean isRecord = isRecord(obj.getClass()) ? true : false;
if (isRecord) {
Like enums, proxies, etc, the ObjectStreamClass knows if a record is a record or not,
so the code can be simplified to
if (desc.isRecord()) {
so the method isRecord can disappear (and writeRecordData can be marked as preview).
regards,
Rémi
More information about the amber-dev
mailing list