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
|
A non-standard Javadoc block tag was used.
```java
/**
* @returns two times n
*/
int twoTimes(int n) {
return 2 * n;
}
```
```java
/**
* @return two times n
*/
int twoTimes(int n) {
return 2 * n;
}
```
Note that any Javadoc line starting with `@`, even embedded inside `<pre>` and
`{@code ...}`, is interpereted as a block tag by the Javadoc parser. As such, if
you wish your Javadoc to include a code block containing an annotation, you
should generally avoid `{@code ...}` and instead write the HTML yourself,
manually escaping the `@` entity.
```java
/**
* Designed to be overridden, such as:
*
* <pre>
* class Foo {
* @Override public String toString() {return "";}
* }
* </pre>
*/
```
## Suppression
Suppress by applying `@SuppressWarnings("InvalidBlockTag")` to the element being
documented.
|