commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <>
Subject Re: [lang][PROPOSAL] How to best address Bug 25454
Date Sat, 13 Dec 2003 22:02:17 GMT
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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message