8007610: javadoc doclint does not work with -private
Reviewed-by: darcy
This commit is contained in:
parent
59318f1b2e
commit
b30e5c6313
@ -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;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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));
|
||||
|
Loading…
Reference in New Issue
Block a user