-
Sub-task
-
Resolution: Unresolved
-
P4
-
25
-
generic
-
generic
The `-Xlint` command line flag for `javac` is used to enable or disable categories of lint warnings generated during compilation. For example, `-Xlint:all,-serial` enables all lint categories and then disables the `serial` category, while the converse `-Xlint:none,serial` disables all lint categories and then enables the `serial` category.
For historical reasons, the appearance of `-Xlint:none` also had the invisible side effect of disabling _all_ non-mandatory warnings, exactly as if the flag `-nowarn` had also been given. As a result, the effect of a flag like `-Xlint:none,serial` was to simply disable all non-mandatory warnings; in particular, no warnings in the `serial` category would be generated.
This invisible side-effect has been eliminated. Now `-Xlint:none` simply disables all lint categories, and a flag like `-Xlint:none,serial` will allow `serial` warnings to appear as expected.
For historical reasons, the appearance of `-Xlint:none` also had the invisible side effect of disabling _all_ non-mandatory warnings, exactly as if the flag `-nowarn` had also been given. As a result, the effect of a flag like `-Xlint:none,serial` was to simply disable all non-mandatory warnings; in particular, no warnings in the `serial` category would be generated.
This invisible side-effect has been eliminated. Now `-Xlint:none` simply disables all lint categories, and a flag like `-Xlint:none,serial` will allow `serial` warnings to appear as expected.