commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandro Lehmann (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-781) Null-Check to variable Object parameters - ObjectUtils.isAnyNull
Date Fri, 06 Jan 2012 08:42:45 GMT

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

Sandro Lehmann commented on LANG-781:
-------------------------------------

But in Validate an Exception is thrown but if you want to use it in an IF (i.e. if(obj1==null
|| obj2==null || ...)) you cannot use it.
                
> Null-Check to variable Object parameters - ObjectUtils.isAnyNull
> ----------------------------------------------------------------
>
>                 Key: LANG-781
>                 URL: https://issues.apache.org/jira/browse/LANG-781
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>    Affects Versions: 3.1
>            Reporter: Sandro Lehmann
>            Priority: Minor
>              Labels: patch
>         Attachments: ObjectUtils.java.patch, ObjectUtilsTest.java.patch
>
>
> Sometimes it would be very comfortable, to test a few objects to null. Instead of writing
if(obj1==null || obj2==null || ...), using a method like isAnyNull(obj1, obj2, ...) would
be much better.

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

        

Mime
View raw message