commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Crum (JIRA)" <>
Subject [jira] Commented: (LANG-618) Add an Assert class to simplify programming.
Date Thu, 15 Apr 2010 13:18:48 GMT


Adrian Crum commented on LANG-618:

A wrapper won't work. Let's say the bar argument is null. The Assert.argumentsNotNull method
will throw an IllegalArgumentException with the message "bar cannot be null." If I have a
wrapper that calls Validate.notNull, the argument name gets discarded and a NullPointerException
is thrown with the message "The validated object is null." Which object was null? Foo or bar?
The Assert class gives the developer more information.

I'm not trying to push this btw. I'm just explaining why I prefer it.

> Add an Assert class to simplify programming.
> --------------------------------------------
>                 Key: LANG-618
>                 URL:
>             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:
For more information on JIRA, see:


View raw message