RFR: 8352612: No way to add back lint categories after "none"

Archie Cobbs acobbs at openjdk.org
Tue Mar 25 13:48:41 UTC 2025


This PR relates to the `-Xlint:none` flag. Currently, it not only disables all lint categories as one would expect, but it also disables all non-mandatory warnings, period. In other words, `-Xlint:none` has `-nowarn` as a hidden side-effect. So for example, trying to do `-Xlint:none,serial` to enable only the `serial` lint category is futile: the category will be enabled but the warnings won't ever appear. This PR removes that hidden side-effect, and also clarifies some of the help output.

-------------

Commit messages:
 - Separate "-nowarn" and "-Xlint:none" and restrict the latter to lint warnings only.

Changes: https://git.openjdk.org/jdk/pull/24227/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24227&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8352612
  Stats: 48 lines in 10 files changed: 20 ins; 6 del; 22 mod
  Patch: https://git.openjdk.org/jdk/pull/24227.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24227/head:pull/24227

PR: https://git.openjdk.org/jdk/pull/24227


More information about the compiler-dev mailing list