commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18942] - [beanutils] Add "t/f" to BooleanConverter
Date Thu, 03 Mar 2005 18:52:06 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=18942>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=18942





------- Additional Comments From jakarta@rizzoweb.com  2005-03-03 19:52 -------
[Simon]
> === BooleanArrayConverter
> 
> Perhaps BooleanArrayConverter should contain a reference to a BooleanConverter,
> with the ConvertUtilsBean.deregister() method ensuring that the
> BooleanArrayConverter constructor is passed the just-created BooleanConverter
> object? That way, any changes to the BooleanConverter will automatically affect
> the BooleanArrayConverter too.
> 
> ie in ConvertUtilsBean.deregister(), do something like this:
>     register(booleanArray.getClass(),
>         new BooleanArrayConverter(bc, booleanArray));
> where bc is the same BooleanConverter object that was registered for the
> Boolean.class type. That way, changing the true/false values for the
> Boolean.class converter will also change the mappings for the
BooleanArrayConverter.
> 
> Or the documentation for the BooleanConverter can just explain that any calls to
>  addTrueString/addFalseString won't affect String->Boolean[] conversions.
> 
> Any such change, however, would have to be carefully done to avoid
> backwards-compatibility issues. For example, the old constructors must remain in
> place.
> 


[Eric response]
I agree that BooleanArrayConverter is poorly written in that it ignores
BooleanConverter. I, too, think it should be rewritten to use BooleanConverter.
However, to me that is a seperate (though related) request from this one. This
one could be accepted/implemented without affecting BooleanArrayConverter (I
agree that at least a comment addition to explicitly state that seperation would
be appropriate). Heck, I might even volunteer to fix BooleanArrayConverter, too,
if my work on BooleanConverter were accepted.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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