commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-686) StringUtils.replaceEachRepeatedly("aaa", new String[]{"aa"}, new String[]{"aXa"}); throw an exception
Date Wed, 27 Jul 2011 08:56:09 GMT

    [ https://issues.apache.org/jira/browse/LANG-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071603#comment-13071603
] 

Sebb commented on LANG-686:
---------------------------

The message is ambiguous; protecting could refer to the first part of the sentence rather
than the exception itself.

How about

"Aborting to protect against StackOverflowError - output of one loop is the input of another"

> StringUtils.replaceEachRepeatedly("aaa", new String[]{"aa"}, new String[]{"aXa"}); throw
an exception
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LANG-686
>                 URL: https://issues.apache.org/jira/browse/LANG-686
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 2.6
>         Environment: jdk 1.6.24, windows xp pro sp3, eclipse helios
>            Reporter: qed
>             Fix For: 3.0.1
>
>
> After executing line
> StringUtils.replaceEachRepeatedly("aaa", new String[]{"aa"}, new String[]{"aXa"});
> exception is thrown:
> Exception in thread "main" java.lang.IllegalStateException: TimeToLive of -1 is less
than 0: aXaXa
> 	at org.apache.commons.lang.StringUtils.replaceEach(StringUtils.java:3986)
> 	at org.apache.commons.lang.StringUtils.replaceEach(StringUtils.java:4099)
> 	at org.apache.commons.lang.StringUtils.replaceEach(StringUtils.java:4099)
> 	at org.apache.commons.lang.StringUtils.replaceEachRepeatedly(StringUtils.java:3920)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message