mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8285496: DocLint does not check for missing @param
tags for type parameters on classes and interfaces
Reviewed-by: darcy, iris
This commit is contained in:
parent
64d98ba100
commit
8190217971
3 changed files with 9 additions and 3 deletions
|
@ -251,7 +251,7 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
||||||
// the following checks are made after the scan, which will record @param tags
|
// the following checks are made after the scan, which will record @param tags
|
||||||
if (isDeclaredType()) {
|
if (isDeclaredType()) {
|
||||||
TypeElement te = (TypeElement) env.currElement;
|
TypeElement te = (TypeElement) env.currElement;
|
||||||
// checkParamsDocumented(te.getTypeParameters()); // See JDK-8285496
|
checkParamsDocumented(te.getTypeParameters());
|
||||||
checkParamsDocumented(te.getRecordComponents());
|
checkParamsDocumented(te.getRecordComponents());
|
||||||
} else if (isExecutable()) {
|
} else if (isExecutable()) {
|
||||||
if (!isOverridingMethod) {
|
if (!isOverridingMethod) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* @test /nodynamiccopyright/
|
* @test /nodynamiccopyright/
|
||||||
* @bug 8004832
|
* @bug 8004832 8285496
|
||||||
* @summary Add new doclint package
|
* @summary Add new doclint package
|
||||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||||
* @build DocLintTester
|
* @build DocLintTester
|
||||||
|
@ -21,4 +21,7 @@ public class MissingParamsTest {
|
||||||
|
|
||||||
/** . */
|
/** . */
|
||||||
<T> void missingTyparam() { }
|
<T> void missingTyparam() { }
|
||||||
|
|
||||||
|
/** . */
|
||||||
|
public class MissingTyparam<T> { /** . */ MissingTyparam() { } }
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,5 +10,8 @@ MissingParamsTest.java:20: warning: no @param for param
|
||||||
MissingParamsTest.java:23: warning: no @param for <T>
|
MissingParamsTest.java:23: warning: no @param for <T>
|
||||||
<T> void missingTyparam() { }
|
<T> void missingTyparam() { }
|
||||||
^
|
^
|
||||||
4 warnings
|
MissingParamsTest.java:26: warning: no @param for <T>
|
||||||
|
public class MissingTyparam<T> { /** . */ MissingTyparam() { } }
|
||||||
|
^
|
||||||
|
5 warnings
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue