[
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]