commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (LANG-1410) StringsUtil.isBlank check null first
Date Thu, 20 Dec 2018 03:56:00 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 20/Dec/18 03:55
            Start Date: 20/Dec/18 03:55
    Worklog Time Spent: 10m 
      Work Description: MarkDacek 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_r243150110
 
 

 ##########
 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:
   Hm, I've given another look through and it would appear that other uses of `sz` are final
as well. 
   
   I don't object to this, but I would question the need for it as the memory gain isn't noticeable.

----------------------------------------------------------------
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:
users@infra.apache.org


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

    Worklog Id:     (was: 177324)
    Time Spent: 1h 50m  (was: 1h 40m)

> 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: 1h 50m
>  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)

Mime
View raw message