Can someone explain to me what's going on here?
public ResponsePK ejbFindByPrimaryKey(int id) throws javax.ejb.FinderException {
try {
loadUsingId(id);
} catch (EJBException fe) {
throw new EJBException(fe);
}
return pk;
}
private void loadUsingId(int id) {
try{
..... }catch (Exception e)
}
Why does this compile? The loadUsingId never throws a FinderException (which is a subclass of Exception) yet the ejbFindByPrimaryKey is permitted to declare that it throws a FinderException when one can never be thrown! Is this a compiler error or am I missing something??