On Mon, 11 Jan 2021 14:58:29 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

>> This PR improves the diagnostic when javac is run in an image that does not 
>> provide a service provider for DocLint.
>> 
>> Instead of reporting messages about unsupported options, the following 
>> warning will be generated:
>> 
>> `
>> Warning: No service provider for doclint is available
>> `
>> 
>> In addition, as a minor cleanup, in the `jdk.javadoc` module, javadoc b 
>> bypasses the service loader to access `doclint` directly.
>
> test/langtools/tools/javac/doclint/LimitedImage.java line 58:
> 
>> 56:         List<String> actualOutput;
>> 57:         List<String> expectedOutput = List.of(
>> 58:                 "- compiler.warn.doclint.not.available",
> 
> Why is the warning key printed instead of the warning message? Limited image 
> breaks property lookup?

It is common practice in jdk.compiler tests to use `-XDrawDiagnostics` which 
disables the use of resource files. The reason is to isolate the tests from the 
locale in which they may be executed, and from minor changes in the resources 
in the resource files, like spelling and grammar fixes, etc.

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

PR: https://git.openjdk.java.net/jdk16/pull/60

Reply via email to