-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add new DefaultTyping.NON_FINAL_AND_ENUMS
to allow Default Typing for Enum
s
#4159
Conversation
Enum
sEnum
s
This PR is against '2.15' branch at the moment, but with possible rebasing to '2.16' branch in mind. I am leaning toward merging into '2.16', since version '2.15' is sort of mature already 🤔.. WDYT @cowtowncoder ? |
If this was to be applied, definitely |
Rebased to |
My apologies, after re-reading #4159 (comment), I realized that if I called |
@JooHyukKim Btw, if for some reason we do want to enable inclusion of polymorphic type for Enums, we could and should simply add a new |
Oh, I thought adding another |
Yeah, realistically changing behavior of an existing choice is bigger change than adding a new one (unless I am missing something). We don't want dozens of |
Enum
sDefaultTyping.NON_FINAL_AND_ENUMS
to allow default type handler for Enum
s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Will try to get merged ASAP.
DefaultTyping.NON_FINAL_AND_ENUMS
to allow default type handler for Enum
sDefaultTyping.NON_FINAL_AND_ENUMS
to allow Default Typing Enum
s
DefaultTyping.NON_FINAL_AND_ENUMS
to allow Default Typing Enum
sDefaultTyping.NON_FINAL_AND_ENUMS
to allow Default Typing for Enum
s
Also realized that the only reason to need In general, use of generic (parameterized) types as root values as an Anti-Pattern for Jackson and should be avoided; particularly so if polymorphic type handling is needed.
So instead of trying read and write
and things work without special handling -- including NO DEFAULT TYPING needed! -- when we avoid generics and polymorphism for root value, and get reliable base type from Field/Method declaration |
As title says, allow default type handler for Enum's.
Fixes #3569