commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hen <...@git.apache.org>
Subject [GitHub] commons-lang pull request: LANG-1184: StringUtils#normalizeSpace n...
Date Sun, 17 Jan 2016 04:21:44 GMT
Github user hen commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/113#discussion_r49941043
  
    --- Diff: src/main/java/org/apache/commons/lang3/StringUtils.java ---
    @@ -8026,34 +8026,31 @@ private static boolean endsWith(final CharSequence str, final
CharSequence suffi
          * @since 3.0
          */
         public static String normalizeSpace(final String str) {
    -        // LANG-1020: Improved performance significantly by normalizing manually instead
of using regex
    -        // See https://github.com/librucha/commons-lang-normalizespaces-benchmark for
performance test
             if (isEmpty(str)) {
                 return str;
             }
    +        if (isBlank(str)){
    --- End diff --
    
    Noting that this means the isEmpty above is unnecessary.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message