Personally, I view this as an anti-pattern. You have a null reference in
your hand, and instead of checking the reference that is in your hand,
you give it to an unrelated class and have that class check to see if it
is a null reference. That just doesn't make any sense to me.
Adrian Crum
Sandglass Software
www.sandglass-software.com
On 2/4/2014 12:02 PM, otaviojava wrote:
GitHub user otaviojava opened a pull request:
https://github.com/apache/commons-lang/pull/16
add isNull and isNotNull methods
Sugestion to add two simple and useful methods, with tests, on ObjectsUtil
to get the code cleaner. isnull and isNotNull. So you can use if
(ObjectUtil.isNull(value)) instead of if (value == null) the goal is the code
more understandable.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/otaviojava/commons-lang trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/16.patch
----
commit 4f4d5b8eecdc61f22363d9d9883626549c12564a
Author: otaviojava <otavioj...@java.net>
Date: 2014-02-04T19:58:43Z
add two simple and useful methods, with tests, on ObjectsUtil to get
the code cleaner. isnull and isNotNull.
----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org