RFR: JDK-8274639: Provide a way to disable warnings for cross-modular links [v3]
Jonathan Gibbons
jjg at openjdk.java.net
Wed Dec 1 23:07:29 UTC 2021
On Wed, 10 Nov 2021 15:32:07 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
>> This is a simple change to add a new `--link-modularity-mismatch (warn|info)` command line option to allow messages about wrong modularity of externally linked documentation bundles to be issued as warnings or notices.
>>
>> CSR: https://bugs.openjdk.java.net/browse/JDK-8274969
>
> Hannes Wallnöfer has updated the pull request incrementally with one additional commit since the last revision:
>
> Improve l10n hint
Minor naming suggestions, but generally approved.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties line 461:
> 459: doclet.usage.link-modularity-mismatch.description=\
> 460: Report external documentation with wrong modularity as either\n\
> 461: warning or informational message. The default behaviour is to\n\
suggest:
> Report external documentation with wrong modularity with either\n\
a warning or informational message.
(change "as" to "with"; add "a" before "warning")
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java line 174:
> 172: info,
> 173: warn
> 174: }
enum name is good; constants could be upper case?
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java line 425:
> 423: String s = args.get(0);
> 424: switch (s) {
> 425: case "warn", "info" -> linkModularityMismatch = ModularityMismatchPolicy.valueOf(s);
If the constants were upper case, you could use `s.toUpperCase(Locale.ROOT)`
-------------
Marked as reviewed by jjg (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5900
More information about the javadoc-dev
mailing list