[ 
https://issues.apache.org/jira/browse/LANG-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857317#action_12857317
 ] 

Adrian Crum commented on LANG-618:
----------------------------------

If I use the wrapper method, then I end up with this:

Assert.argumentsNotNull("Argument \"foo\" cannot be null.", foo, "Argument 
\"bar\" cannot be null.", bar, ...);

and I still get a NullPointerException instead of an IllegalArgumentException.

The bottom line is, I would be trying to use Validate for something it wasn't 
designed for. It just isn't a good fit.

The idea behind Assert was to make argument checking convenient - so that it 
will be done more often, and to make the exceptions it throws meaningful to 
developers.


> Add an Assert class to simplify programming.
> --------------------------------------------
>
>                 Key: LANG-618
>                 URL: https://issues.apache.org/jira/browse/LANG-618
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>    Affects Versions: 3.1
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: LANG-618.patch
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to