mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
||||
if (isDeclaredType()) {
|
||||
TypeElement te = (TypeElement) env.currElement;
|
||||
// checkParamsDocumented(te.getTypeParameters()); // See JDK-8285496
|
||||
checkParamsDocumented(te.getTypeParameters());
|
||||
checkParamsDocumented(te.getRecordComponents());
|
||||
} else if (isExecutable()) {
|
||||
if (!isOverridingMethod) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 8004832
|
||||
* @bug 8004832 8285496
|
||||
* @summary Add new doclint package
|
||||
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
|
||||
* @build DocLintTester
|
||||
|
@ -21,4 +21,7 @@ public class MissingParamsTest {
|
|||
|
||||
/** . */
|
||||
<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>
|
||||
<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