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


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.

Reply via email to