Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-346

Enum type is not supported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.0-BETA
    • 2.0.0-M2
    • Bean / Property Utils
    • None
    • JDK6

    Description

      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); }

      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              miro Miroslav Nachev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m