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 14170] - ConvertUtils.convert(Object) doesn't use registered convertor
Date Sat, 21 Dec 2002 19:54:48 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14170>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

ConvertUtils.convert(Object) doesn't use registered convertor

craig.mcclanahan@sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From craig.mcclanahan@sun.com  2002-12-21 19:54 -------
I've implemented a partial solution to this problem, which should allow
applications to do custom Object->String conversions without impacting the rest
of how beanutils conversions work.  It is available in the 20021222 nightly
build of commons-beanutils.

The basic idea is that the "ConvertUtils.convert(Object value)" method now uses
the registered Converter for java.util.String.  The default implementation of
this Converter uses toString() -- preserving backwards compatibility -- but you
can register something that is smarter for your own needs.  The drawback is that
this single Object->String converter needs to be smart enough to handle *all* of
these conversions, not just your custom ones.

A longer term solution would be to move towards bidirectional converters of some
sort.  But let's see if this change satisfies the immediate needs.  Could you
test it, please?

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


Mime
View raw message