[
https://issues.apache.org/jira/browse/LANG-1429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
devson updated LANG-1429:
-------------------------
Description:
Method name: WordUtils.wrap
The behavior is inconsistent across the two tests about whether the
leading space of string should be retained or not while wrapping. The
string “ This is a sentence with leading whitespace.” retains the leading
whitespace over wrap length 50, but removes it at a wrap length 30.
Also, the trailing spaces are not preserved while wrapping, as shown below:
{code:java}
String nl = System.lineSeparator();
assertEquals("Did you say " + nl + "\"supercalifr" + nl + "agilisticexp" + nl +
"ialidocious?" + nl + "\" How do" + nl + "you spell" + nl + "that odd" + nl +
"word," + nl + "anyways?", WordUtils.wrap("Did you say
\"supercalifragilisticexpialidocious?\" How do you spell that odd word,
anyways?", 12,null,true)); // fails
{code}
was:
Method name: WordUtils.wrap
The behavior is inconsistent across the two tests about whether the
leading space of string should be retained or not while wrapping. The
string “ This is a sentence with leading whitespace.” retains the leading
whitespace over wrap length 50, but removes it at a wrap length 30.
Also, the trailing spaces are not preserved while wrapping, as shown below:
String nl = System.lineSeparator();
assertEquals("Did you say " + nl + "\"supercalifr" + nl + "agilisticexp" + nl +
"ialidocious?" + nl + "\" How do" + nl + "you spell" + nl + "that odd" + nl +
"word," + nl + "anyways?", WordUtils.wrap("Did you say
\"supercalifragilisticexpialidocious?\" How do you spell that odd word,
anyways?", 12,null,true)); // fails
> Behavioral inconsistencies across different wrap length
> -------------------------------------------------------
>
> Key: LANG-1429
> URL: https://issues.apache.org/jira/browse/LANG-1429
> Project: Commons Lang
> Issue Type: Bug
> Reporter: devson
> Priority: Major
>
> Method name: WordUtils.wrap
> The behavior is inconsistent across the two tests about whether the
> leading space of string should be retained or not while wrapping. The
> string “ This is a sentence with leading whitespace.” retains the leading
> whitespace over wrap length 50, but removes it at a wrap length 30.
> Also, the trailing spaces are not preserved while wrapping, as shown below:
>
> {code:java}
> String nl = System.lineSeparator();
> assertEquals("Did you say " + nl + "\"supercalifr" + nl + "agilisticexp" + nl
> + "ialidocious?" + nl + "\" How do" + nl + "you spell" + nl + "that odd" + nl
> + "word," + nl + "anyways?", WordUtils.wrap("Did you say
> \"supercalifragilisticexpialidocious?\" How do you spell that odd word,
> anyways?", 12,null,true)); // fails
> {code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)