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

Sebb commented on LANG-1410:
----------------------------

However, in this case it would be possible to eliminate the variable entirely:

{code}
        if (cs == null) {
            return true;
        }
        for (int i = 0; i < cs.length(); i++) {
            if (!Character.isWhitespace(cs.charAt(i))) {
                return false;
            }
        }
        return true;
{code}

> StringsUtil.isBlank check null first
> ------------------------------------
>
>                 Key: LANG-1410
>                 URL: https://issues.apache.org/jira/browse/LANG-1410
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>            Reporter: Yifan Guo
>            Priority: Minor
>
> StringsUtil.isBlank should check null for cs first instead of declaring int 
> strLen first.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to