Remove all the throw NullPointerException() from the code
---------------------------------------------------------

                 Key: DIRMINA-769
                 URL: https://issues.apache.org/jira/browse/DIRMINA-769
             Project: MINA
          Issue Type: Task
    Affects Versions: 2.0.0-RC1
            Reporter: Emmanuel Lecharny
            Priority: Critical
             Fix For: 2.0.0


There are many parts of the code where we can find code like :
    public void addListener(IoFutureListener<?> listener) {
        if (listener == null) {
            throw new NullPointerException("listener");
        }
      ...

This is utter nonsense. I don't know why this kind of code came to make a 
connection in the author brain, but if we are to get a NPE at some point, then 
let it be. No need to generate some fake one ! Otherwise, 
IllegalArgumentException is the way to go !

This is typically such code that make me fume...  Know the f***ing API, for X 
sake !


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to