Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 12142 invoked from network); 16 Mar 2011 04:00:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Mar 2011 04:00:54 -0000 Received: (qmail 52612 invoked by uid 500); 16 Mar 2011 04:00:53 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 51618 invoked by uid 500); 16 Mar 2011 04:00:52 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 51583 invoked by uid 99); 16 Mar 2011 04:00:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2011 04:00:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2011 04:00:50 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 969CD3AB8E3 for ; Wed, 16 Mar 2011 04:00:29 +0000 (UTC) Date: Wed, 16 Mar 2011 04:00:29 +0000 (UTC) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Message-ID: <494019384.5912.1300248029613.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1344198695.10581.1299763259485.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (LANG-686) StringUtils.replaceEachRepeatedly("aaa", new String[]{"aa"}, new String[]{"aXa"}); throw an exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007341#comment-13007341 ] Henri Yandell commented on LANG-686: ------------------------------------ At the very least the exception could explain what the problem is rather than what the state of an obscure private variable is. > 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.1 > > Original Estimate: 1h > Remaining Estimate: 1h > > 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