Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
None
-
None
-
None
-
Operating System: other
Platform: Other
-
19857
Description
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);
Attachments
Issue Links
- is related to
-
BEANUTILS-206 Check registered Converters for super classes if not found
- Closed