commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r539835 - /jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
Date Sun, 20 May 2007 06:47:01 GMT
Author: niallp
Date: Sat May 19 23:47:00 2007
New Revision: 539835

URL: http://svn.apache.org/viewvc?view=rev&rev=539835
Log:
Fix for BEANUTILS-249 - BeanUtilsBean does not convert objects using custom convertors properly
- thanks to Brad

Modified:
    jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java

Modified: jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java?view=diff&rev=539835&r1=539834&r2=539835
==============================================================================
--- jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
(original)
+++ jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
Sat May 19 23:47:00 2007
@@ -989,10 +989,8 @@
             } else if (value instanceof String[]) {
                 newValue = getConvertUtils().convert(((String[]) value)[0],
                                                 type);
-            } else if (getConvertUtils().lookup(value.getClass()) != null) {
-                newValue = getConvertUtils().convert(value.toString(), type);
             } else {
-                newValue = value;
+                newValue = getConvertUtils().convert(value, type);
             }
         }
 



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