Java: Detect spurious param Javadoc tag of generic classes

This commit is contained in:
Marcono1234
2021-09-09 00:11:02 +02:00
parent 5d58edb3b9
commit a173d9593b
5 changed files with 50 additions and 13 deletions

View File

@@ -105,4 +105,18 @@ public class Test<V> {
*/
SomeClass(int i, int j) {}
}
/**
* @param <T> exists
* @param T wrong syntax
* @param <X> does not exist
*/
class GenericClass<T> {}
/**
* @param <T> exists
* @param T wrong syntax
* @param <X> does not exist
*/
interface GenericInterface<T> {}
}

View File

@@ -8,3 +8,7 @@
| Test.java:91:6:91:12 | @param | This @param tag does not have a value. |
| Test.java:97:6:97:12 | @param | This @param tag does not have a value. |
| Test.java:104:8:104:14 | @param | @param tag "k" does not match any actual parameter of constructor "SomeClass()". |
| Test.java:111:6:111:12 | @param | @param tag "T" does not match any actual type parameter of type "GenericClass". |
| Test.java:112:6:112:12 | @param | @param tag "<X>" does not match any actual type parameter of type "GenericClass". |
| Test.java:118:6:118:12 | @param | @param tag "T" does not match any actual type parameter of type "GenericInterface". |
| Test.java:119:6:119:12 | @param | @param tag "<X>" does not match any actual type parameter of type "GenericInterface". |