Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-16278

BeanUtils.isSimpleValueType() returns false for enums overriding a method

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Complete
    • None
    • 4.3.14, 5.0.3
    • Core
    • None
    • true

    Description

      BeanUtils.isSimpleValueType() uses Class.isEnum() to determine whether a type is an enum. Class.isEnum(), however, returns false for certain enum values, namely ones overriding a method in their superclass. Using Enum.class.isAssignableFrom() instead would make the behavior more predictable.

      Attachments

        Issue Links

          Activity

            People

              juergen.hoeller Juergen Hoeller
              eh Eetu Huisman
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3 years, 38 weeks, 1 day ago