Beispiel

public static class ClassA {
public void methodA {

try {
//...
} catch ( NullPointerException e ) {
//...
}
}

Lösung
Erstellen Sie für jede Ausnahmebedingung, die in der throws-Klausel deklariert ist, eine dedizierte catch-Klausel.

public static class ClassA {
public void methodA {

try {
//...
} catch ( Error e ) {
//...
}
}