<div dir="ltr"><div>Hi Jon,</div><div><br></div><div>Thanks for that confirmation. I was guessing these were probably just "leftovers" but am glad to hear your more informed second opinion.</div><div><br></div><div>In case you're wondering where this question comes from (pretty random I realize), it relates to some lint-related cleanup I'm working on where those tests got flagged.<br></div><div><br></div><div>Thanks,<br></div><div>-Archie<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 7, 2024 at 10:30 AM Jonathan Gibbons <<a href="mailto:jjg3@pobox.com">jjg3@pobox.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
<p>Archie,</p>
<p>I looked at a selection of those tests. I note that in general,
these tests are all very old, and (mostly) predate OpenJDK. I
don't think there was ever any explicit reason (as in, test
failure) to suppress path warnings; my recollection is that it was
more about defensively ignoring any unrelated warnings.</p>
<p>From the current source in LintCategory, I note:<br>
</p>
<div style="background-color:rgb(255,255,255);color:rgb(8,8,8)">
<pre style="font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(140,140,140);font-style:italic">/**
</span><span style="color:rgb(140,140,140);font-style:italic"> * Warn about invalid path elements on the command line.
</span><span style="color:rgb(140,140,140);font-style:italic"> * Such warnings cannot be suppressed with the SuppressWarnings
</span><span style="color:rgb(140,140,140);font-style:italic"> * annotation.
</span><span style="color:rgb(140,140,140);font-style:italic"> */
</span><span style="color:rgb(135,16,148);font-style:italic">PATH</span>(<span style="color:rgb(6,125,23)">"path"</span>),
</pre>
<p>which means that the tests are more susceptible to invalid path
entries on the classpath, sourcepath etc.<br>
That may have been a bigger deal back in the day, before we had
better control of the test execution <br>
environment. <br>
</p>
<p>My guess is that looking at the overall set of tests that use
`-Xlint` or `-Xlint:all`, we are not <br>
consistent about using `-path`, suggesting that there are no
failures when it is not used, and thus <br>
no longer any reason to specify it on the tests that you list.</p>
<pre style="font-family:"JetBrains Mono",monospace;font-size:9.8pt">-- Jon
</pre>
</div>
<div>On 11/6/24 1:40 PM, Archie Cobbs wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Question for the list...</div>
<div><br>
</div>
<div>I've noticed that several compiler regression tests are
compiled with <span style="font-family:monospace">-Xlint:all,-path</span>
or <span style="font-family:monospace">Xlint:-path</span>.</div>
<div><br>
</div>
<div>I'm wondering what the suppression of <span style="font-family:monospace">path</span> is for. When I
remove the <span style="font-family:monospace">-path</span>
part, the tests still pass.</div>
<div><br>
</div>
<div>Does anyone know why those tests are compiled with <span style="font-family:monospace">path</span> suppressed? Is it
some Windows thing?</div>
<div><br>
</div>
<div>Examples:</div>
<div><br>
</div>
<div style="margin-left:40px"><span style="font-family:monospace">test/langtools/tools/javac/6304921/T6304921.java<br>
test/langtools/tools/javac/T5048776.java<br>
test/langtools/tools/javac/T6245591.java<br>
test/langtools/tools/javac/T6247324.java<br>
test/langtools/tools/javac/processing/TestWarnErrorCount.java<br>
test/langtools/tools/javac/warnings/DivZero.java<br>
test/langtools/tools/javac/warnings/FallThrough.java<br>
test/langtools/tools/javac/warnings/Unchecked.java</span></div>
<div><br>
</div>
<div>Thanks,</div>
<div>-Archie<br>
</div>
<div><br>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">Archie L. Cobbs<br>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div>