Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
3.5
-
None
-
None
Description
Running following line of code results in StringIndexOutOfBoundsException (in 3.5 release)
WordUtils.wrap("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",70);
java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1967) at org.apache.commons.lang3.text.WordUtils.wrap(WordUtils.java:328) at org.apache.commons.lang3.text.WordUtils.wrap(WordUtils.java:176) at org.apache.commons.lang3.text.WordUtils.wrap(WordUtils.java:100) at pl.netpr.commons.string.TextToolsTest.testWrap(TextToolsTest.java:245)
It worked fine with 3.4 releae.
Attachments
Attachments
Issue Links
- is duplicated by
-
LANG-1302 java.lang.StringIndexOutOfBoundsException resulting in WordUtils.wrap
- Closed