commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos (JIRA)" <j...@apache.org>
Subject [jira] [Created] (TEXT-152) infinite loop in WordUtils.wrap
Date Sun, 03 Mar 2019 21:22:00 GMT
Carlos created TEXT-152:
---------------------------

             Summary: infinite loop in WordUtils.wrap
                 Key: TEXT-152
                 URL: https://issues.apache.org/jira/browse/TEXT-152
             Project: Commons Text
          Issue Type: Bug
    Affects Versions: 1.7
            Reporter: Carlos
             Fix For: 1.7


this infinite loop can be reproduced with this unit test:

 
{code:java}
@Test
public void testWrapAtStartAndEnd() {
    assertThat(WordUtils.wrap("nabcdefabcdefn", 2, "\n", false, "(?=n)")).isEqualTo("\nabcdefabcdef\n");
}
{code}



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

Mime
View raw message