-
Bug
-
Resolution: Unresolved
-
P5
-
None
-
25
-
generic
-
generic
This is a "cleanup" issue.
Back in 2011, in order to prevent repeated warnings about bootclasspath not being set (JDK-7022337), this code was added 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 hacky workaround creates a black hole for future warnings that might be added in the `"options"` category and, due to improvements to the compiler design since then, it's also 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.
Back in 2011, in order to prevent repeated warnings about bootclasspath not being set (
// 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 hacky workaround creates a black hole for future warnings that might be added in the `"options"` category and, due to improvements to the compiler design since then, it's also 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.
- caused by
-
JDK-7022337 repeated warnings about bootclasspath not set
-
- Closed
-
- duplicates
-
JDK-8353221 Code to forcibly set -Xlint:-options can be removed
-
- Closed
-
- links to
-
Review(master) openjdk/jdk/24309