提交 d43c2fbd 编写于 作者: J jjg

8007610: javadoc doclint does not work with -private

Reviewed-by: darcy
上级 568453e3
......@@ -801,7 +801,9 @@ public class DocEnv {
doclintOpts.add(opt == null ? DocLint.XMSGS_OPTION : DocLint.XMSGS_CUSTOM_PREFIX + opt);
}
if (doclintOpts.size() == 1
if (doclintOpts.isEmpty()) {
doclintOpts.add(DocLint.XMSGS_OPTION);
} else if (doclintOpts.size() == 1
&& doclintOpts.get(0).equals(DocLint.XMSGS_CUSTOM_PREFIX + "none")) {
return;
}
......
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -47,8 +47,8 @@ public class T6735320 extends JavadocTester {
public static void main(String... args) {
T6735320 tester = new T6735320();
if (tester.runJavadoc(ARGS) != 0) {
throw new AssertionError("non-zero return code from javadoc");
if (tester.runJavadoc(ARGS) == 0) {
throw new AssertionError("zero return code from javadoc");
}
if (tester.getErrorOutput().contains("StringIndexOutOfBoundsException")) {
throw new AssertionError("javadoc threw StringIndexOutOfBoundsException");
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 8004834
* @bug 8004834 8007610
* @summary Add doclint support into javadoc
*/
......@@ -157,6 +157,10 @@ public class DocLintTest {
Main.Result.OK,
EnumSet.of(Message.DL_WRN12));
test(Arrays.asList(rawDiags, "-private"),
Main.Result.ERROR,
EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12));
test(Arrays.asList(rawDiags, "-Xdoclint:syntax", "-private"),
Main.Result.ERROR,
EnumSet.of(Message.DL_ERR6, Message.DL_WRN12));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册