<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Aren't these constructors chained?  I believe it is quite common
      practice to use nulls when calling a chained constructor to get a
      default for that parameter.  If a certain type of convenience
      constructor is missing, a caller can pass in `null` for the
      parameter they'd like defaulted.  It's not too far-fetched to
      allow this **if** there is a constructor where this parameter is
      omitted and is assigned a default.<br>
      <br>
      If anything, the constructors IMHO should document that for
      certain parameters passing in `null` results in a specific
      default.<br>
    </p>
    <p>--John<br>
    </p>
    <div class="moz-cite-prefix">On 18/08/2025 19:46, Nir Lisker wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+0ynh-tjJ5DjKPiNkDEBO4xDD144YQrg+t3QpQewZZabM7Vqg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi all,<br>
        <br>
        In DateTimeStringConverter, NumberStringConverter, and their
        subclasses, null parameters sent to the constructors are
        internally converted to default values. This is not specified,
        but it's how the implementation behaves. I'm working on some
        changes there and was thinking about changing the behavior to
        throw NPEs as it makes no sense to pass null into these and it's
        probably a bug more than anything.
        <div><span
style="background-color:rgb(0,128,0);color:rgb(18,144,195);font-family:Consolas;font-size:11pt;white-space:pre"></span></div>
        <div><br>
        </div>
        <div>The LocalDate/Time converters specified the null-friendly
          behavior in their docs even though it doesn't make much sense
          there either.</div>
        <div><br>
        </div>
        <div>Are we allowed to change this?</div>
        <div><br>
        </div>
        <div>- Nir</div>
      </div>
    </blockquote>
  </body>
</html>