
errorprone.bugpattern.javadoc.InvalidThrows.md Maven / Gradle / Ivy
The newest version!
The `@throws` tag should not document a checked exception which is not actually
thrown by the documented method.
```java
/**
* Validates {@code n}.
*
* @throws Exception if n is negative.
*/
void validate(int n) {
...
}
```
## Suppression
Suppress by applying `@SuppressWarnings("InvalidThrows")` to the element being
documented.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy