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 [EMAIL PROTECTED]  2005-03-03 19:45 -------
Thanks, Simon, for taking a look. I'll address each of your points with
individual comments.

[Simon]
> === How do end users actually use this new functionality?
> 
> Were you thinking of something like this?
>   BooleanConverter bc = (BooleanConverter) ConvertUtils.lookup(Boolean.class);
>   bc.addTrueString("oui");
>   bc.addFalseString("non");
> 
> or like this?
>   BooleanConverter bc = new BooleanConverter();
>   bc.addTrueString("oui");
>   bc.addFalseString("non");
>   ConvertUtils.register(bc, Boolean.class);
> 
> If the latter, then it seems *almost* as easy for the user to just write a
> custom Converter class of their own that implements their desired mapping than
> for BeanUtils to provide a configurable BooleanConverter...
> 
> In either case, *just* the conversion of String->Boolean is affected.
> String->boolean and String->Boolean[] conversions have not been modified (see
below)
> 

[Eric response]
I disagree that using this configurable converter is not significantly easier
than writing your own. BeanUtils is a framework and as such should be as
configurable as is reasonably possible. Writing a new implementation just to
handle "T"/"F" is overkill, IMO.
Also, the current ConvertUtils by default registers two separate (but identical)
converters for Boolean and boolean, which I think is a mistake. I would amend my
patch to use the same converter for both types.
It doesn't matter if the user chooses form A or form B that you describe above -
they amount to the same thing.



-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to