commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohsen Saboorian <mohs...@gmail.com>
Subject [beanutils] On Converters
Date Sat, 07 Apr 2007 08:13:43 GMT

Hi,

I've noticed that ConvertUtilsBean.register only accepts destination class
for conversion. Are all source values regarded as Strings, and then
converted to the destination class? Why is it so? 

line #1007 of BeanUtilsBean.java:
newValue = getConvertUtils().convert(value.toString(), type);

Suppose the case that I have a java.sql.Timestamp and want to convert it to
java.utils.Date. It first converts Timestamp to String and then I have to
parse it again in my custom converter (registered for java.util.Date) ....
Parsing a Date string is a rather timely process.

I'm using beanutils 1.7.

Thanks.
-- 
View this message in context: http://www.nabble.com/-beanutils--On-Converters-tf3540137.html#a9882201
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message