<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 10/31/19 8:33 AM, Remi Forax wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1164147528.1249688.1572525229179.JavaMail.zimbra@u-pem.fr">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div><br>
</div>
<div><br>
</div>
<hr id="zwchr" data-marker="__DIVIDER__">
<div data-marker="__HEADERS__">
<blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De:
</b>"Chris Hegarty" <a class="moz-txt-link-rfc2396E" href="mailto:chris.hegarty@oracle.com"><chris.hegarty@oracle.com></a><br>
<b>À: </b>"Vicente Romero"
<a class="moz-txt-link-rfc2396E" href="mailto:vicente.romero@oracle.com"><vicente.romero@oracle.com></a><br>
<b>Cc: </b>"amber-spec-experts"
<a class="moz-txt-link-rfc2396E" href="mailto:amber-spec-experts@openjdk.java.net"><amber-spec-experts@openjdk.java.net></a><br>
<b>Envoyé: </b>Jeudi 31 Octobre 2019 13:25:53<br>
<b>Objet: </b>Re: forbidding serialization methods as
members of records<br>
</blockquote>
</div>
<div data-marker="__QUOTED_TEXT__">
<blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br
class="">
<div><br class="">
<blockquote class="">
<div class="">On 31 Oct 2019, at 12:21, Vicente Romero
<<a href="mailto:vicente.romero@oracle.com"
class="" target="_blank" moz-do-not-send="true">vicente.romero@oracle.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class=""> Hi,<br class="">
<br class="">
In the past we discussed about forbidding the
declaration of some serialization related methods in
records. In particular:<br class="">
<font class="" size="+1"><br class="">
<span class="c-message__body" dir="auto">
<pre class="c-mrkdwn__pre">writeObject(ObjectOutputStream)
readObjectNoData()
readObject(ObjectInputStream)</pre>
</span></font>I wonder if we still want to enforce
that restriction, meaning that it should be
reflected in the spec, or if it is not necessary
anymore,<br class="">
</div>
</div>
</blockquote>
<br class="">
</div>
<div>Where we ended up with Serializable Records, is that
the runtime is specified to ignore these methods if they
appear in a serializable record ( there are tests that
assert this ). The javac restriction is no longer
strictly necessary, but of course catches
effectively-useless declarations early, and without
resorting checkers, inspection, etc.</div>
</blockquote>
<div><br>
</div>
<div>It is necessary from a user point of view to have a javac
error, having something that silently fails is the worst in
term of user experience.<br data-mce-bogus="1">
</div>
</div>
</div>
</blockquote>
<br>
would a warning be an option?<br>
<blockquote type="cite"
cite="mid:1164147528.1249688.1572525229179.JavaMail.zimbra@u-pem.fr">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div data-marker="__QUOTED_TEXT__">
<div><br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
<blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
<div>-Chris.</div>
</blockquote>
<div><br>
</div>
<div>Rémi<br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
</div>
</div>
</blockquote>
Vicente<br>
</body>
</html>