mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8247815: doclint: recategorize "no description for ..." as MISSING, not SYNTAX
Reviewed-by: prappo
This commit is contained in:
parent
2e6923ffd6
commit
8b6d3147fb
@ -1168,7 +1168,7 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
env.messages.warning(SYNTAX, tree, "dc.empty", tree.getKind().tagName);
|
||||
env.messages.warning(MISSING, tree, "dc.empty", tree.getKind().tagName);
|
||||
}
|
||||
|
||||
boolean hasNonWhitespace(TextTree tree) {
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8004834 8007610 8129909 8182765
|
||||
* @bug 8004834 8007610 8129909 8182765 8247815
|
||||
* @summary Add doclint support into javadoc
|
||||
* @modules jdk.compiler/com.sun.tools.javac.main
|
||||
*/
|
||||
@ -178,7 +178,7 @@ public class DocLintTest {
|
||||
Main.Result.OK,
|
||||
EnumSet.of(Message.DL_WRN12));
|
||||
|
||||
test(List.of(htmlVersion, rawDiags, "-Xdoclint:syntax"),
|
||||
test(List.of(htmlVersion, rawDiags, "-Xdoclint:missing"),
|
||||
Main.Result.OK,
|
||||
EnumSet.of(Message.DL_WRN12));
|
||||
|
||||
@ -186,7 +186,7 @@ public class DocLintTest {
|
||||
Main.Result.ERROR,
|
||||
EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12));
|
||||
|
||||
test(List.of(htmlVersion, rawDiags, "-Xdoclint:syntax", "-private"),
|
||||
test(List.of(htmlVersion, rawDiags, "-Xdoclint:missing,syntax", "-private"),
|
||||
Main.Result.ERROR,
|
||||
EnumSet.of(Message.DL_ERR6, Message.DL_WRN12));
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-syntax EmptyAuthorTest.java
|
||||
* @run main DocLintTester -Xmsgs:syntax -ref EmptyAuthorTest.out EmptyAuthorTest.java
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyAuthorTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyAuthorTest.out EmptyAuthorTest.java
|
||||
*/
|
||||
|
||||
/** @author */
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-syntax EmptyExceptionTest.java
|
||||
* @run main DocLintTester -Xmsgs:syntax -ref EmptyExceptionTest.out EmptyExceptionTest.java
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyExceptionTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyExceptionTest.out EmptyExceptionTest.java
|
||||
*/
|
||||
|
||||
/** . */
|
||||
public class EmptyExceptionTest {
|
||||
/** @exception NullPointerException */
|
||||
int emptyException() throws NullPointerException { }
|
||||
void emptyException() throws NullPointerException { }
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-syntax EmptyParamTest.java
|
||||
* @run main DocLintTester -Xmsgs:syntax -ref EmptyParamTest.out EmptyParamTest.java
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyParamTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyParamTest.out EmptyParamTest.java
|
||||
*/
|
||||
|
||||
/** . */
|
||||
public class EmptyParamTest {
|
||||
/** @param i */
|
||||
int emptyParam(int i) { }
|
||||
void emptyParam(int i) { }
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-syntax EmptyReturnTest.java
|
||||
* @run main DocLintTester -Xmsgs:syntax -ref EmptyReturnTest.out EmptyReturnTest.java
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyReturnTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyReturnTest.out EmptyReturnTest.java
|
||||
*/
|
||||
|
||||
/** . */
|
||||
public class EmptyReturnTest {
|
||||
/** @return */
|
||||
int emptyReturn() { }
|
||||
int emptyReturn() { return 0; }
|
||||
}
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-syntax EmptySerialDataTest.java
|
||||
* @run main DocLintTester -Xmsgs:syntax -ref EmptySerialDataTest.out EmptySerialDataTest.java
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptySerialDataTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptySerialDataTest.out EmptySerialDataTest.java
|
||||
*/
|
||||
|
||||
import java.io.ObjectOutputStream;
|
||||
@ -13,6 +13,10 @@ import java.io.Serializable;
|
||||
|
||||
/** . */
|
||||
public class EmptySerialDataTest implements Serializable {
|
||||
/** @serialData */
|
||||
/**
|
||||
* .
|
||||
* @serialData
|
||||
* @param s .
|
||||
*/
|
||||
private void writeObject(ObjectOutputStream s) { }
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EmptySerialDataTest.java:16: warning: no description for @serialData
|
||||
/** @serialData */
|
||||
^
|
||||
EmptySerialDataTest.java:18: warning: no description for @serialData
|
||||
* @serialData
|
||||
^
|
||||
1 warning
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-syntax EmptySerialFieldTest.java
|
||||
* @run main DocLintTester -Xmsgs:syntax -ref EmptySerialFieldTest.out EmptySerialFieldTest.java
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptySerialFieldTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptySerialFieldTest.out EmptySerialFieldTest.java
|
||||
*/
|
||||
|
||||
import java.io.ObjectStreamField;
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-syntax EmptySinceTest.java
|
||||
* @run main DocLintTester -Xmsgs:syntax -ref EmptySinceTest.out EmptySinceTest.java
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptySinceTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptySinceTest.out EmptySinceTest.java
|
||||
*/
|
||||
|
||||
/** . */
|
||||
public class EmptySinceTest {
|
||||
/** @since */
|
||||
int emptySince() { }
|
||||
void emptySince() { }
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @bug 8004832 8247815
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.compiler/com.sun.tools.doclint
|
||||
* @build DocLintTester
|
||||
* @run main DocLintTester -Xmsgs:-syntax EmptyVersionTest.java
|
||||
* @run main DocLintTester -Xmsgs:syntax -ref EmptyVersionTest.out EmptyVersionTest.java
|
||||
* @run main DocLintTester -Xmsgs:-missing EmptyVersionTest.java
|
||||
* @run main DocLintTester -Xmsgs:missing -ref EmptyVersionTest.out EmptyVersionTest.java
|
||||
*/
|
||||
|
||||
/** . */
|
||||
public class EmptyVersionTest {
|
||||
/** @version */
|
||||
int missingVersion() { }
|
||||
void missingVersion() { }
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8198552
|
||||
* @bug 8198552 8247815
|
||||
* @summary Check that -Xdoclint: option can be specified multiple times
|
||||
* @compile/fail/ref=MultipleDocLintOptionsTest.out -Xdoclint:html -Xdoclint:syntax -XDrawDiagnostics MultipleDocLintOptionsTest.java
|
||||
* @compile/fail/ref=MultipleDocLintOptionsTest.out -Xdoclint:html -Xdoclint:missing -XDrawDiagnostics MultipleDocLintOptionsTest.java
|
||||
*/
|
||||
|
||||
/** <html> */
|
||||
|
||||
@ -135,7 +135,7 @@ public class DocLintTest {
|
||||
Main.Result.OK,
|
||||
EnumSet.of(Message.DL_WRN12));
|
||||
|
||||
test(Arrays.asList(rawDiags, "-Xdoclint:syntax"),
|
||||
test(Arrays.asList(rawDiags, "-Xdoclint:syntax,missing"),
|
||||
Main.Result.ERROR,
|
||||
EnumSet.of(Message.DL_ERR6, Message.DL_WRN12));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user