commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad (JIRA)" <j...@apache.org>
Subject [jira] Created: (BEANUTILS-249) BeanUtilsBean does not convert objects using custom convertors properly
Date Fri, 06 Oct 2006 23:43:19 GMT
BeanUtilsBean does not convert objects using custom convertors properly
-----------------------------------------------------------------------

                 Key: BEANUTILS-249
                 URL: http://issues.apache.org/jira/browse/BEANUTILS-249
             Project: Commons BeanUtils
          Issue Type: Bug
    Affects Versions: 1.7.0 Release
         Environment: Linux/Java5
            Reporter: Brad
            Priority: Critical


BeanUtilsBean.setProperty(Object bean, String name, Object value) cannot properly convert
any custom class using convertor.

Line 1007

It calls toString() on every object regardless of its type (unless it was a string or an array).
This prevent custom convertors from functioning.
 
            } else if (getConvertUtils().lookup(value.getClass()) != null) {
                newValue = getConvertUtils().convert(value.toString(), type);   //<---
WRONG!
            } else {
                newValue = value;
            }
        }




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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