<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>(resending with right formatting, sorry)<br>
</p>
<p><br>
</p>
<div class="markdown-here-wrapper" data-md-url="" style="">
<p style="margin: 0px 0px 1.2em !important;">I see that you have
basically left the discussion on remapping exception (even
though there’s no section on it).</p>
<p style="margin: 0px 0px 1.2em !important;">IMHO that is still
confusing. The first example ends up like this:</p>
<pre style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;font-size: 1em; line-height: 1.2em;margin: 1.2em 0px;"><code class="hljs language-java" style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;white-space: pre; overflow: auto; border-radius: 3px; border: 1px solid rgb(204, 204, 204); padding: 0.5em 0.7em; display: block !important;display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248) none repeat scroll 0% 0%; -moz-text-size-adjust: none;"><span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">public</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">PositiveBigInteger</span><span class="hljs-params">(<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">long</span> value)</span> </span>{
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">super</span>(value); <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// potentially doing useless work here</span>
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">if</span> (value <= <span class="hljs-number" style="color: rgb(0, 128, 128);">0</span>)
<span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">throw</span> <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">new</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">IllegalArgumentException</span><span class="hljs-params">(<span class="hljs-string" style="color: rgb(221, 17, 68);">"non-positive value"</span>)</span></span>;
}
</code></pre>
<p style="margin: 0px 0px 1.2em !important;">|</p>
<p style="margin: 0px 0px 1.2em !important;">The second example
ends up like this:</p>
<pre style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;font-size: 1em; line-height: 1.2em;margin: 1.2em 0px;"><code class="hljs language-java" style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;white-space: pre; overflow: auto; border-radius: 3px; border: 1px solid rgb(204, 204, 204); padding: 0.5em 0.7em; display: block !important;display: block; overflow-x: auto; padding: 0.5em; color: rgb(51, 51, 51); background: rgb(248, 248, 248) none repeat scroll 0% 0%; -moz-text-size-adjust: none;"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">public</span> <span class="hljs-class"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">class</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;color: rgb(68, 85, 136); font-weight: bold;">CustomDeflaterInputStream</span> <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">extends</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;color: rgb(68, 85, 136); font-weight: bold;">DeflaterInputStream</span> </span>{
<span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">public</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">CustomDeflaterInputStream</span><span class="hljs-params">(InputStream in)</span> </span>{
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">if</span> (in == <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">null</span>)
<span class="hljs-function"><span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">throw</span> <span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">new</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">IllegalArgumentException</span><span class="hljs-params">(<span class="hljs-string" style="color: rgb(221, 17, 68);">"null input"</span>)</span></span>;
<span class="hljs-keyword" style="color: rgb(51, 51, 51); font-weight: bold;">super</span>(in); <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// we avoided NullPointerException thrown here</span>
}
}
</code></pre>
<p style="margin: 0px 0px 1.2em !important;">Both are in the form
“if (something) throw”. To me that is just parameter vaildation.
The exact reason as to why parameter validation might be helpful
in each case is irrelevant here - the two examples are morally
equivalent - or, at the very least, the second example doesn’t
deserve “all that space” in the JEP.</p>
<p style="margin: 0px 0px 1.2em !important;">You have three very
very nice examples:</p>
<ul style="margin: 1.2em 0px;padding-left: 2em;">
<li style="margin: 0.5em 0px;">parameter validation</li>
<li style="margin: 0.5em 0px;">passing argument twice</li>
<li style="margin: 0.5em 0px;">complex initialization</li>
</ul>
<p style="margin: 0px 0px 1.2em !important;">I’d say just add
three sections with one example each and call it a day. Unless
you can thing of something that looks more “qualitatively”
different.</p>
<p style="margin: 0px 0px 1.2em !important;">Maurizio</p>
<p style="margin: 0px 0px 1.2em !important;">On 27/01/2023 20:52,
Archie Cobbs wrote:</p>
<blockquote style="margin: 1.2em 0px;border-left: 4px solid
rgb(221, 221, 221); padding: 0px 1em; color: rgb(119, 119, 119);
quotes: none;">
<p style="margin: 0px 0px 1.2em !important;">On Fri, Jan 27,
2023 at 12:16 PM Archie Cobbs <<a class="moz-txt-link-abbreviated" href="mailto:archie.cobbs@gmail.com">archie.cobbs@gmail.com</a></p>
<p style="margin: 0px 0px 1.2em !important;"><a href="http://mailto:archie.cobbs@gmail.com">archie.cobbs@gmail.com</a>>
wrote:</p>
<p style="margin: 0px 0px 1.2em !important;">On Thu, Jan 26,
2023 at 5:51 PM Brian Goetz <<a class="moz-txt-link-abbreviated" href="mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a></p>
<p style="margin: 0px 0px 1.2em !important;"><a href="http://mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a>>
wrote:</p>
<p style="margin: 0px 0px 1.2em !important;">I think that’s
where we should start; if we are spectacularly<br>
successful, we can come back for more.</p>
<p style="margin: 0px 0px 1.2em !important;">OK thanks.
Proceeding…</p>
<p style="margin: 0px 0px 1.2em !important;">JEP is updated <a href="https://bugs.openjdk.org/browse/JDK-8300786" class="moz-txt-link-freetext">https://bugs.openjdk.org/browse/JDK-8300786</a>.
Not<br>
surprisingly, it has gotten a good bit simpler.</p>
<p style="margin: 0px 0px 1.2em !important;">Change log…</p>
<ul style="margin: 1.2em 0px;padding-left: 2em;">
<li style="margin: 0.5em 0px;">Removed discussions of ‘this’
escape, try { } blocks and<br>
initialization order - Removed if/then example choosing
between two<br>
different superclass constructors - Restate JLS changes</li>
</ul>
<p style="margin: 0px 0px 1.2em !important;">The updated JLS
changes are:</p>
<ol style="margin: 1.2em 0px;padding-left: 2em;">
<li style="margin: 0.5em 0px;">Change the grammar for <code style="font-size: 0.85em; font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;">ConstructorBody</code>
to:</li>
</ol>
<p style="margin: 0px 0px 1.2em !important;">ConstructorBody: {
[BlockStatements] } ; { [BlockStatements]<br>
ExplicitConstructorInvocation [BlockStatements] } ;</p>
<ol style="margin: 1.2em 0px;padding-left: 2em;">
<li style="margin: 0.5em 0px;">Specify that the
BlockStatements prior to<br>
ExplicitConstructorInvocation are in a static context
(§8.1.3)</li>
</ol>
<p style="margin: 0px 0px 1.2em !important;">Reload & resume
firing… :)</p>
<p style="margin: 0px 0px 1.2em !important;">-Archie</p>
<p style="margin: 0px 0px 1.2em !important;">— Archie L. Cobbs</p>
</blockquote>
<div title="MDH:PGJyPkkgc2VlIHRoYXQgeW91IGhhdmUgYmFza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