commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Vorburger (Updated) (JIRA)" <>
Subject [jira] [Updated] (BEANUTILS-403) ConvertUtilsBean should allow registering Converters with source class
Date Fri, 04 Nov 2011 23:39:51 GMT


Michael Vorburger updated BEANUTILS-403:

          Component/s: ConvertUtils & Converters
    Affects Version/s: 1.8.3
> ConvertUtilsBean should allow registering Converters with source class
> ----------------------------------------------------------------------
>                 Key: BEANUTILS-403
>                 URL:
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: ConvertUtils & Converters
>    Affects Versions: 1.8.3
>            Reporter: Michael Vorburger
>         Attachments:
> ConvertUtils should allow registering Converters not only with destination class, but
with destination AND with source class.
> In addition to the void register(Converter converter, Class clazz) method, there should
also be a register(Converter converter, Class sourceClass, Class destinationClass).  The implementation
in Converter lookup(Class sourceType, Class targetType), which currently in the last line
just does return lookup(targetType), should look for a Converter registered with both targetType
& sourceType (if any).
> This would allow something like the attached example (Test case) to work, where I'd like
to register a Converter which can turn A into B, as well as another Converter which can turn
into Object into B (imagine B being something like a DynaBean) - this is not currently possible,
but would be useful.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message