<div dir="ltr"><div dir="ltr"><div>After your comments, I realize that, except primitive types, no type in the JDK will opt-in to become a null-restricted value class type because this would be an incompatible change.<br></div>Future added types may opt into being null-restricted value types from the get go.<br><div><div>It means`null` can be used today with confidence it won't go away in the future.<br><br>> As currently specified, there is no clean Duration value that could
    be used as a sentinel (alternative to null) except in some
    application specific use.<br><br></div><div>That's true.<br></div><div>I currently have a `public static final Duration UNLIMITED = Duration.ofSeconds(Long.MAX_VALUE);`, but this is not really a sentinel, and any other `Duration.ofSeconds(Long.MAX_VALUE)` is equal to it. So it's not a problem.<br><br></div><div>Thanks all!<br></div></div></div></div>

<br>
<i style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background:rgb(255,255,255);font-family:proxima-nova-zendesk,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;color:rgb(85,85,85)"><span style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background:transparent;font-family:proxima-nova-zendesk,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:600"><font size="2">CONFIDENTIALITY NOTICE: This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by e-mail and delete the message and any file attachments from your computer. Thank you.</font></span></i>