commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (BEANUTILS-249) BeanUtilsBean does not convert objects using custom convertors properly
Date Mon, 06 Nov 2006 05:20:38 GMT
     [ http://issues.apache.org/jira/browse/BEANUTILS-249?page=all ]

Niall Pemberton updated BEANUTILS-249:
--------------------------------------

    Component/s: Converters

> 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
>          Components: Converters
>    Affects Versions: 1.7.0
>         Environment: Linux/Java5
>            Reporter: Brad
>            Priority: Critical
>             Fix For: 1.8.0
>
>
> 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