<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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:#ffffff;color:#080808">
      <pre
      style="font-family:'JetBrains Mono',monospace;font-size:9.8pt;"><span
      style="color:#8c8c8c;font-style:italic;">/**
</span><span style="color:#8c8c8c;font-style:italic;"> * Warn about invalid path elements on the command line.
</span><span style="color:#8c8c8c;font-style:italic;"> * Such warnings cannot be suppressed with the SuppressWarnings
</span><span style="color:#8c8c8c;font-style:italic;"> * annotation.
</span><span style="color:#8c8c8c;font-style:italic;"> */
</span><span style="color:#871094;font-style:italic;">PATH</span>(<span
      style="color:#067d17;">"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 class="moz-cite-prefix">On 11/6/24 1:40 PM, Archie Cobbs wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANSoFxsodHEZ9R4Z24=TMAz+Mgvcmo561PP62Jw5eVAEhzQk_g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
            data-smartmail="gmail_signature">Archie L. Cobbs<br>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>