The inspection ignores methods related to serialization, for example the methods readObject()
and writeObject()
.
Example:
void method() throws InterruptedException {
System.out.println();
}
The quick-fix removes unnecessary exceptions from the declaration and normalizes redundant try
-catch
statements:
void method() {
System.out.println();
}
Note: Some exceptions may not be reported during in-editor highlighting for performance reasons. To see all results, run the inspection by selecting Code | Inspect Code or Code | Analyze Code | Run Inspection by Name from the main menu.
Use the Ignore exceptions thrown by entry point methods option to not report exceptions thrown by
for example main()
methods.
Entry point methods can be configured in the settings of the
Java | Declaration redundancy | Unused declaration inspection.