[
https://issues.apache.org/jira/browse/MATH-856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450877#comment-13450877
]
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 behavior
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: https://issues.apache.org/jira/browse/MATH-856
> Project: Commons Math
> Issue Type: Task
> Affects Versions: 3.0
> Reporter: Gilles
> Priority: Trivial
> Fix For: 3.1, 4.0
>
>
> [Discussions|http://markmail.org/message/cl2e6c4pqbluo63e] 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: http://www.atlassian.com/software/jira