[
https://issues.apache.org/jira/browse/DIRMINA-769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Lecharny deleted DIRMINA-769:
--------------------------------------
> 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
> Reporter: Emmanuel Lecharny
> Priority: Critical
>
> 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.