RFR: 8235876: Misleading warning message in java source-file mode [v2]
Vicente Romero
vromero at openjdk.java.net
Wed Nov 24 16:13:10 UTC 2021
On Wed, 24 Nov 2021 13:52:36 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> Execution of `java --source 7 Test.java` displays following warning:
>> `warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.`
>>
>> However use of `-Xlint:-options` is not allowed and so it proposes an invalid suggestion.
>>
>> This is yet another case of "too much information" provided to user in source-file mode.
>> Target audience of source-file mode are Java beginners with very simple cases.
>> Many options are not available in source-file mode and so this patch disables also related options warnings.
>>
>> The case is similar to JDK-8268869
>>
>> Patch adds `-Xlint:-options` into the list of default javac options in source-file mode.
>> Relevant test is also provided.
>>
>> Thanks,
>> Adam
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>
> removed obsolete part of the test
lgtm
-------------
Marked as reviewed by vromero (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6537
More information about the compiler-dev
mailing list