Skip to content

BeanUtils.isSimpleValueType() returns false for enums overriding a method [SPR-16278] #20825

Closed
@spring-projects-issues

Description

@spring-projects-issues

Eetu Huisman opened SPR-16278 and commented

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.


Issue Links:

Referenced from: commits d3e0f4d, 6f6ff33

Backported to: 4.3.14

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions