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