commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MATH-403) Never propagate a "NullPointerException" resulting from bad usage of the API
Date Sun, 06 Mar 2011 14:02:25 GMT

    [ https://issues.apache.org/jira/browse/MATH-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003174#comment-13003174
] 

Gilles commented on MATH-403:
-----------------------------

Discussion is ongoing on whether we should really _always_ check for "null".

For those cases where it will make the failure closer to the source of the problem (the uninitialized
reference), a "checkNotNull" utility method will added in "MathUtils".


> Never propagate a "NullPointerException" resulting from bad usage of the API
> ----------------------------------------------------------------------------
>
>                 Key: MATH-403
>                 URL: https://issues.apache.org/jira/browse/MATH-403
>             Project: Commons Math
>          Issue Type: Task
>            Reporter: Gilles
>            Priority: Minor
>             Fix For: 3.0
>
>
> Package "exception" contains a class named "NullArgumentException" meant to signal that
an argument was "null" where it shouldn't have been.
> For consistency, every method of the API should be checked for "null" arguments and throw
"NullArgumentException" appropriately.
> This means hunting down all unchecked uses of references. Is there a tool that will report
those?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message