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

ASF GitHub Bot commented on LANG-1184:
--------------------------------------

Github user PascalSchumacher commented on the pull request:

    https://github.com/apache/commons-lang/pull/113#issuecomment-172354689
  
    @garydgregory @hen Thanks for the reviews. :)
    
    As mentioned in the jira issue the goal of this pull request is not to add 
anything, but to restore pre-3.4 functionality: 
    
    These work with 3.3.2, but fail with 3.4:
    
    ```java
    assertEquals("a b", StringUtils.normalizeSpace("a\u00A0 b"));
    assertEquals("b", StringUtils.normalizeSpace("b\u0000"));
    ```
    
    while keeping in place most of the performance improvement added in 
https://github.com/apache/commons-lang/commit/bc8e23808b9d8d0c9b67270ef35d04ebd9d89cc8
 
    
    I used same tests 
https://github.com/librucha/commons-lang-normalizespaces-benchmark and there is 
only a 10% performance regression for the restored pre-3.4 behavior (the 
trimming of the string and the normalization of non-braking spaces). 
    
    



> StringUtils#normalizeSpace no longer normalizes unicode non-breaking spaces 
> (\u00A0) and does not trim control chars at the end any more
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LANG-1184
>                 URL: https://issues.apache.org/jira/browse/LANG-1184
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.4
>            Reporter: Pascal Schumacher
>
> These work with 3.3.2, but fail with 3.4
> {code:java}assertEquals("a b", StringUtils.normalizeSpace("a\u00A0 b"));{code}
> {code:java}assertEquals("b", StringUtils.normalizeSpace("b\u0000"));{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to