commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duncan Jones (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (LANG-957) WordUtils.wrap(String, int) doesn't behave according to JavaDoc
Date Sat, 03 May 2014 19:28:14 GMT

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

Duncan Jones closed LANG-957.
-----------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: Patch Needed)

A later bug was opened for this issue and resolved with a patch supplied from GitHub.

> WordUtils.wrap(String, int) doesn't behave according to JavaDoc
> ---------------------------------------------------------------
>
>                 Key: LANG-957
>                 URL: https://issues.apache.org/jira/browse/LANG-957
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.text.*
>    Affects Versions: 3.2.1
>            Reporter: Benedikt Ritter
>
> The JavaDoc of {{WordUtils.wrap(String, int)}} says that leading white spaces on new
lines are stripped from the result. However the following test will fail, since the leading
spaces of the second line are not stripped from the resultL
> {code:java}
> @Test
> public void testWordUtils_StringInt_LeadingWhitespaces {
>         input = "spaces                               spaces";
>         expected = "spaces              " + systemNewLine + "spaces";
>         assertEquals(expected, WordUtils.wrap(input, 20));
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message