To what extent should one make exceptions redundant or atomic to a method.
For instance, suppose I have a method
public void authenticate(String username, String password) that calls
private void invokeServer(String username, String password).
Both methods require those params to be non-zero length, and as such I would raise a
NullPointerException if needed. Should I sanity check in
invokeServer as well as
authenticate on the basis that it could potentially be used independently at a later date?