forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpuriousJavadocParam.java
More file actions
52 lines (42 loc) · 1.08 KB
/
SpuriousJavadocParam.java
File metadata and controls
52 lines (42 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/**
* BAD: The following param tag is empty.
*
* @param
*/
public void emptyParamTag(int p){ ... }
/**
* BAD: The following param tag has a misspelled value.
*
* @param prameter The parameter's value.
*/
public void typo(int parameter){ ... }
/**
* BAD: The following param tag appears to be outdated
* since the method does not take any parameters.
*
* @param sign The number's sign.
*/
public void outdated(){ ... }
/**
* BAD: The following param tag uses html within the tag value.
*
* @param <code>ordinate</code> The value of the y coordinate.
*/
public void html(int ordinate){ ... }
/**
* BAD: Invalid syntax for type parameter.
*
* @param T The type of the parameter.
* @param parameter The parameter value.
*/
public <T> void parameterized(T parameter){ ... }
/**
* GOOD: A proper Javadoc comment.
*
* This method calculates the absolute value of a given number.
*
* @param <T> The number's type.
* @param x The number to calculate the absolute value of.
* @return The absolute value of <code>x</code>.
*/
public <T extends Number> T abs(T x){ ... }