commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] [Commented] (MATH-856) Deprecate "NullArgumentException"
Date Fri, 07 Sep 2012 18:43:08 GMT


Phil Steitz commented on MATH-856:

+1 for deprecating NAE, but maintaining null-checking where it exists now and for APIs that
can benefit from full parameter checking.
+0 for allowing APIs that cannot reasonably check for and document null handling behavior
to just allow NPEs to propagate untrapped, undocumented and unadvertised
-1 for throwing argumentless NPEs via APIs that check for null arguments and document null

I think we should continue to throw IAE in the last case above, with informative messages
where appropriate.  Eliminating NAE in this case will result in APIs that currently check
for nulls and throw a NAE with localized message to instead throw MathIAE with the same message.
> Deprecate "NullArgumentException"
> ---------------------------------
>                 Key: MATH-856
>                 URL:
>             Project: Commons Math
>          Issue Type: Task
>    Affects Versions: 3.0
>            Reporter: Gilles
>            Priority: Trivial
>             Fix For: 3.1, 4.0
> [Discussions|] on the "dev" ML concluded
that "NullArgumentException" was more of a burden to maintain than it brings benefits.
> It will be deprecated in 3.1 and removed in 4.0.
> Checks for "null" in CM code will either be maintained or be removed.
> Whenever checks for "null" are performed, the exception to be thrown is the standard
"NullPointerException" (instantiated with the no-arg constructor).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message