Java
Unchecked exception declared in 'throws' clause
Warning
New
Last modified: 03 December 2024 Reports declaration of an unchecked exception (java.lang.RuntimeException
or one of its subclasses) in the throws
clause of a method.
Declarations of unchecked exceptions are not required and may be deleted or moved to a Javadoc @throws
tag.
Example:
public class InvalidDataException extends RuntimeException {}
class TextEditor {
void readSettings() throws InvalidDataException {} // warning: Unchecked exception 'InvalidDataException' declared in 'throws' clause
}
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
ThrowsRuntimeException
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?