<html><body><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>"Vicente Romero" <vicente.romero@oracle.com><br><b>À: </b>"Remi Forax" <forax@univ-mlv.fr>, "Chris Hegarty" <chris.hegarty@oracle.com><br><b>Cc: </b>"amber-spec-experts" <amber-spec-experts@openjdk.java.net><br><b>Envoyé: </b>Jeudi 31 Octobre 2019 13:51:04<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>
    <br>
    <div class="moz-cite-prefix">On 10/31/19 8:33 AM, Remi Forax wrote:<br>
    </div>
    <blockquote cite="mid:1164147528.1249688.1572525229179.JavaMail.zimbra@u-pem.fr">
      
      <div style="font-family: arial, helvetica, sans-serif; font-size:
        12pt; color: #000000">
        <div><br>
        </div>
        <div><br>
        </div>
        <hr id="zwchr">
        <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;"><b>De:
            </b>"Chris Hegarty" <a class="moz-txt-link-rfc2396E" href="mailto:chris.hegarty@oracle.com" target="_blank"><chris.hegarty@oracle.com></a><br>
            <b>À: </b>"Vicente Romero"
            <a class="moz-txt-link-rfc2396E" href="mailto:vicente.romero@oracle.com" target="_blank"><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" target="_blank"><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>
          <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">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>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    would a warning be an option?</blockquote><div><br></div><div>Why letting the option for a user to shoot itself in the foot ? It's not like it will work sometimes.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Rémi<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;"><br>
    <blockquote cite="mid:1164147528.1249688.1572525229179.JavaMail.zimbra@u-pem.fr">
      <div style="font-family: arial, helvetica, sans-serif; font-size:
        12pt; color: #000000">
        <div>
          <div><br>
          </div>
          <div><br>
          </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>
          </div>
          <div><br>
          </div>
        </div>
      </div>
    </blockquote>
    Vicente<br><br></blockquote></div></div></body></html>