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

ASF GitHub Bot logged work on LANG-1410:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Dec/18 06:53
            Start Date: 18/Dec/18 06:53
    Worklog Time Spent: 10m 
      Work Description: rosti-il commented on a change in pull request #392: 
LANG-1410: eliminate one unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r242423165
 
 

 ##########
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##########
 @@ -338,15 +338,17 @@ public static boolean isAllEmpty(final CharSequence... 
css) {
      * @since 3.0 Changed signature from isBlank(String) to 
isBlank(CharSequence)
      */
     public static boolean isBlank(final CharSequence cs) {
-        int strLen;
 
 Review comment:
   @MarkDacek, this and also the `isWhitespace()` methods are just string scan 
methods. They don't need the string length except the very beginning. Thus the 
original value returned by `cs.length()` doesn't need to be memorized.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 176393)
    Time Spent: 40m  (was: 0.5h)

> 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
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> 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