You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/10/23 18:23:00 UTC

[jira] [Work logged] (BEANUTILS-346) Enum type is not supported

     [ https://issues.apache.org/jira/browse/BEANUTILS-346?focusedWorklogId=332763&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-332763 ]

ASF GitHub Bot logged work on BEANUTILS-346:
--------------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/Oct/19 18:22
            Start Date: 23/Oct/19 18:22
    Worklog Time Spent: 10m 
      Work Description: melloware commented on pull request #16: [BEANUTILS-346] New converter for Enum
URL: https://github.com/apache/commons-beanutils/pull/16
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 332763)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>            Priority: Major
>             Fix For: 2.0.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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 was sent by Atlassian Jira
(v8.3.4#803005)