Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 56016 invoked from network); 13 Dec 2003 21:58:45 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 13 Dec 2003 21:58:45 -0000 Received: (qmail 90272 invoked by uid 500); 13 Dec 2003 21:58:29 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 90214 invoked by uid 500); 13 Dec 2003 21:58:29 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 90201 invoked from network); 13 Dec 2003 21:58:29 -0000 Received: from unknown (HELO protactinium.btinternet.com) (194.73.73.176) by daedalus.apache.org with SMTP; 13 Dec 2003 21:58:29 -0000 Received: from [81.128.68.157] (helo=oemcomputer) by protactinium.btinternet.com with smtp (Exim 3.22 #25) id 1AVHmU-0002nd-00 for commons-dev@jakarta.apache.org; Sat, 13 Dec 2003 21:58:34 +0000 Message-ID: <007501c3c1c4$c65c62c0$9d448051@oemcomputer> From: "Stephen Colebourne" To: "Jakarta Commons Developers List" References: <245A7290F0E0D311BF6E009027E7908B07204A19@atlanta.seagullsw.com> <3FDB77CA.1010706@steitz.com> Subject: Re: [lang][PROPOSAL] How to best address Bug 25454 Date: Sat, 13 Dec 2003 22:02:17 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N From: "Phil Steitz" > The example in the bug report looks like a bug to me, which should be > fixed. I doubt seriously that anyone is relying on the following kind of > bugged behavior: > > StringUtils.replaceChars("abc", "abc", "cba") = "aba" > > This results from the string being modified and re-searched in a loop over > the search characters (so multiple "translations" may be applied, > depending on the order of characters in the search string). > > As long as the search and replace character strings have the same length, > StringUtils.replaceChars() *should* produce the same results as > CharSetUtils.translate(). > > I suggest, therefore > > (5) Fix the bug in StringUtils.replaceChars() and improve the javadoc for > this method. +1, replaceChars should be like calling replaceChars(String, char, char) multiple times. Stephen --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org