commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun Thomas" <arun.tho...@paybytouch.com>
Subject RE: [lang][PROPOSAL] How to best address Bug 25454
Date Sat, 13 Dec 2003 17:48:09 GMT
+1 to #3

Anyone that's followed the instructions is getting incorrect behaviour that what they were
expecting anyway....  Either they've fixed it (in which case they're either dependent on the
current functionality of replaceChars, or on something completely related) or it hasn't bitten
them yet (in which case, we'll have something to help fix the problem by the time it does
bite them).  

-AMT

-----Original Message-----
From: Gary Gregory [mailto:ggregory@seagullsw.com] 
Sent: Friday, December 12, 2003 11:07 AM
To: 'Jakarta Commons Developers List'
Subject: [lang][PROPOSAL] How to best address Bug 25454 


Hello [lang],

Reference: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25454

Here is the pickle: 

CharSetUtils.translate(String,String,String) is deprecated in favor of
StringUtils.replaceChars(String,String,String) but their behaviors are different. 

The choices as I see them are (compatibility issues noted are with lang
/2.0/):

(1) Make StringUtils.replaceChars exactly like CharSetUtils.translate. 
Pro: Backwards compatible with the Javadoc in CharSetUtils.translate.
Con: Not Backwards compatible with the current StringUtils.replaceChars.

(2) Do (1) and add a new function ("replaceChars2" for the sake of this
description) in StringUtils to do what replaceChars does now.
Pro: Backwards compatible with the Javadoc in CharSetUtils.translate.
Pro: Backwards compatible with the current StringUtils.replaceChars, it has not changed.
Con: StringUtils now has 2 functions, replaceChars and "replaceChars2", do we need both?

(3) Point the Javadoc for the deprecated CharSetUtils.translate to a new StringUtils function
replaceChars2.
Pro: Backwards compatible with the current StringUtils.replaceChars, it has not changed.
Con: Well... in theory, calls sites that have followed the deprecated instructions now will
now be "incorrect" and will have to be changed again.

(4) "un-deprecate" CharSetUtils.translate(String,String,String) and say that both methods
do different jobs.

Opinions please?

Thanks,
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