Ejemplo


public class SpecificException extends Exception {

public SpecificException() {
super();
}
}


public class Example {
public void compute(Object subject) throws SpecificException {
if (subject == null){
throw new SpecificException();
}
//...
}

public void declaresException(Object o) throws Exception {
compute(o);
}
}

Solución
Declare todas las excepciones comprobadas en la cláusula throws.


public class SpecificException extends Exception {
public SpecificException() {
super();
}
}

public class Solution {
public void compute(Object subject) throws SpecificException {
if (subject == null) {
throw new SpecificException();
}
//...
}

public void declaresException(Object o) throws SpecificException {
compute(o);
}
}