You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Duncan Jones (JIRA)" <ji...@apache.org> on 2014/05/03 21:28:14 UTC
[jira] [Closed] (LANG-957) WordUtils.wrap(String, int) doesn't
behave according to JavaDoc
[ 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)