Reports exceptions that are declared in a method's signature but never thrown by the method itself or its implementations/derivatives. Inspection ignores methods related to the serialization, for example methods readObject() or writeObject().

Example:

  void method() throws InterruptedException {
    System.out.println();
  }

The quick-fix removes unnecessary exceptions from the declaration and normalizes the redundant try-catch statements:

  void method() {
    System.out.println();
  }

NOTE: Some exceptions might not be reported during in-editor highlighting. Due to performance reasons, a non-private method is checked only when it's name rarely occurs in the project. To see all results, please run the inspection using Analyze | Inspect Code... or Analyze | Run Inspection by Name...

Use the checkbox below to ignore exceptions thrown by entry points methods. Entry points methods are configured the inspection Java | Declaration redundancy | Unused declaration