-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed as not planned
Closed as not planned
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply
Description
My problem with the current EnumToStringConverter is that it doesn't put in the hands of the coder the decision on how to represent the Enum value (at least easily). It uses the .name() instead of the .toString(), so one cannot override it.
I have a workaround, make a custom converter and register it. Although, it can get cumbersome if I need to do this for multiple enums.
My point is, why not use the .toString() method, by default it will use the .name(), and if the coder wants to change it, simply overrides the .toString() and returns whatever he wants.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply