Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-projects-issues opened this issue Dec 7, 2017 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 7, 2017

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

@spring-projects-issues spring-projects-issues added type: bug A general bug status: backported An issue that has been backported to maintenance branches in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.0.3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants