diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java index f10bd27d35c..974b8518867 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java @@ -631,7 +631,7 @@ public void initDocLint(List opts, Set customTagNames) { } } else { // no -Xmsgs options of any kind, use default - doclintOpts.add(DocLint.XMSGS_OPTION); + return; } if (!customTagNames.isEmpty()) { diff --git a/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java b/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java index ff6e5ec8dff..6a61a89e85a 100644 --- a/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java +++ b/test/langtools/jdk/javadoc/tool/doclint/DocLintTest.java @@ -153,14 +153,12 @@ void run() throws Exception { files = List.of(new TestJFO("Test.java", code)); test(List.of(htmlVersion), - Main.Result.ERROR, - EnumSet.of(Message.DL_ERR10A, Message.DL_WRN14A, - Message.JD_NOTE_MARK)); + Main.Result.OK, + EnumSet.of(Message.JD_WRN10, Message.JD_WRN14)); test(List.of(htmlVersion, rawDiags), - Main.Result.ERROR, - EnumSet.of(Message.DL_ERR10, Message.DL_WRN14, - Message.JD_NOTE_MARK)); + Main.Result.OK, + EnumSet.of(Message.JD_WRN10, Message.JD_WRN14)); // test(List.of("-Xdoclint:none"), // Main.Result.OK, @@ -184,9 +182,8 @@ void run() throws Exception { EnumSet.of(Message.DL_WRN14, Message.JD_NOTE_MARK)); test(List.of(htmlVersion, rawDiags, "-private"), - Main.Result.ERROR, - EnumSet.of(Message.DL_ERR6, Message.DL_ERR10, - Message.DL_WRN14, Message.JD_NOTE_MARK)); + Main.Result.OK, + EnumSet.of(Message.JD_WRN10, Message.JD_WRN14)); test(List.of(htmlVersion, rawDiags, "-Xdoclint:missing,syntax", "-private"), Main.Result.ERROR,