Integrated: 8352731: Compiler workaround to forcibly set "-Xlint:-options" can be removed
Archie Cobbs
acobbs at openjdk.org
Fri Apr 11 13:32:39 UTC 2025
On Sat, 29 Mar 2025 04:18:36 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
> Back in 2011, in order to prevent repeated warnings about bootclasspath not being set ([JDK-7022337](https://bugs.openjdk.org/browse/JDK-7022337)), code was added to `JavaCompiler.java` to forcibly set the `-Xlint:-options` flag after compiler startup:
>
> // forcibly set the equivalent of -Xlint:-options, so that no further
> // warnings about command line options are generated from this point on
> options.put(XLINT_CUSTOM.primaryName + "-" + LintCategory.OPTIONS.option, "true");
> options.remove(XLINT_CUSTOM.primaryName + LintCategory.OPTIONS.option);
>
> This workaround complicates logic relating to warnings in the `"options"` category and, due to improvements to the compiler design since then, it's no longer needed to actually fix the problem. So it can be removed.
>
> As a separate cleanup, the field `optionsCheckingInitiallyDisabled` in `JavaCompiler.java` is no longer used and so it can also be removed.
This pull request has now been integrated.
Changeset: e604bb9e
Author: Archie Cobbs <acobbs at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/e604bb9e9412310d6d63da0b0f475f9da54ff244
Stats: 15 lines in 1 file changed: 0 ins; 15 del; 0 mod
8352731: Compiler workaround to forcibly set "-Xlint:-options" can be removed
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/jdk/pull/24309
More information about the compiler-dev
mailing list