commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <p...@steitz.com>
Subject Re: [lang] How to best address Bug 25454 - Part 2
Date Mon, 15 Dec 2003 02:11:28 GMT
Gary Gregory wrote:
> It seems that the consensus is to just fix StringUtils.replaceChars(S,S,S),
> so I have done so.

Looks good to me.

> 
> I have added a couple more unit tests to cover more of the Javadoc examples
> and the example cited in the email thread.
> 
> Please note the following: the pre-fix unit tests asserted that if an input
> string was not "modified" (in quotes since Java String are immutable), the
> return String had to be the "same" (Assert.assertSame as opposed to
> Assert.assertEquals). The current impl return a new string from the working
> buffer even if no replace took place. The Javadoc contract does not specify
> the old behavior or even hint at it, the only mention of returning the input
> string is if it or the search chars are empty. Please let me know if you
> think this is a problem.

I have no problem with returning a copy from the buffer in all cases.

Phil

> 
> Thank you,
> Gary




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message