commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (BEANUTILS-187) [beanutils] Methods ConvertUtilsBean.convert could check for converters registered with base classes
Date Sat, 17 Feb 2007 09:32:05 GMT

     [ https://issues.apache.org/jira/browse/BEANUTILS-187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Yandell resolved BEANUTILS-187.
-------------------------------------

    Resolution: Won't Fix

No views expressed since I suggested resolving this wontfix, so doing so.

> [beanutils] Methods ConvertUtilsBean.convert could check for converters registered with
base classes
> ----------------------------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-187
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-187
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: ConvertUtils & Converters
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Alexander Borschet
>            Priority: Minor
>
> When converting a value to a class instance it is possible tu register user
> defined classes that implement the converter interface.
> The method convert(String value, Class clazz) in ConvertUtilsBean tries to get
> an instance of a converter class simply by checking the collection of registered
> converters.
> Unfortunately converters that have been registered for super classes are not
> considered.
> REQUEST: How about improving the method convert by the following code lines:
> Class baseclazz     = clazz;
> Converter converter = null;
> do {
>        	converter = (Converter) converters.get(baseclazz);
>        	if (converter != null)
> 		break;
>        	baseclazz = clazz.getSuperclass();
> } while (baseclazz != null);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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