An exception in a throws declaration in Java is superfluous if it is:

Noncompliant Code Example

void foo() throws MyException, MyException {}  // Noncompliant; should be listed once
void bar() throws Throwable, Exception {}  // Noncompliant; Exception is a subclass of Throwable
void baz() throws RuntimeException {}  // Noncompliant; RuntimeException can always be thrown

Compliant Solution

void foo() throws MyException {}
void bar() throws Throwable {}
void baz() {}