commons-issues 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-346) Enum type is not supported
Date Wed, 10 Jun 2009 09:33:08 GMT

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

Niall Pemberton updated BEANUTILS-346:
--------------------------------------

    Fix Version/s:     (was: 1.8.0)
                   LATER THAN 1.8.0

> Enum type is not supported
> --------------------------
>
>                 Key: BEANUTILS-346
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-346
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.0-BETA
>         Environment: JDK6
>            Reporter: Miroslav Nachev
>             Fix For: LATER THAN 1.8.1
>
>
> When I try to set some property of type Enum the exception is thrown. This can be fixed
with the following code:
>     private static class EnumConvertUtils extends ConvertUtilsBean {
>         public EnumConvertUtils() {
>         }
>         @Override
>         public Object convert(String value, Class clazz) {
>             if(clazz.isEnum())
>                 return Enum.valueOf(clazz, value);
>             return super.convert(value, clazz);
>         }
>     }

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


Mime
View raw message