commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "devson (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LANG-1399) Split fails on word boundaries
Date Mon, 11 Jun 2018 07:45:00 GMT

     [ https://issues.apache.org/jira/browse/LANG-1399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

devson updated LANG-1399:
-------------------------
    Environment: Produced on v3.7 with Java 8, running Windows. But this may be produced
in any environment  (was: I'm working with the latest version of Apache Commons lib. with
Java 8)

> Split fails on word boundaries
> ------------------------------
>
>                 Key: LANG-1399
>                 URL: https://issues.apache.org/jira/browse/LANG-1399
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.x
>         Environment: Produced on v3.7 with Java 8, running Windows. But this may be
produced in any environment
>            Reporter: devson
>            Priority: Major
>
> StringUtils.split does not behave correctly when the split is to be performed on word
boundary characters ("\b"). Steps to produce the bug:
> String string = "foo<bar>foofoo";
> String[] st=StringUtils.split(string, "\b");
> Expected o/p:
> foo
> <
> bar
> >
> foofoo
>  
> Actual o/p:
> foo<bar>foofoo
> The issue seems to be with how zero-width separators are being handled. Note that Java
library's String.split gives the expected output.
> Thanks.



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

Mime
View raw message