-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
added SET_PROPERTY_CREATOR_AS_DEFAULT MapperFeature #1634
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
Conversation
I'm sorry but I don't think this makes sense. This would enable auto-detection of all constructors, without annotation. |
Only for those for which creator data is created. This solves the issue of not providing @JsonCreator when using parameter names module and since it's disabled by default, there's no bc issue. |
@@ -213,6 +213,8 @@ | |||
*/ | |||
INFER_CREATOR_FROM_CONSTRUCTOR_PROPERTIES(true), | |||
|
|||
SET_PROPERTY_CREATOR_AS_DEFAULT(false), |
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.
Need javadoc, including both explanation and since 2.9
indicator.
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.
added javadoc
Ah. Ok. So only gets called if "creator-ness" is first decided. Makes sense. I think it'd be good to have a test case in |
I agree that there should be a test, but I'm not sure what use case to cover without ParameterNamesModule. Constructor with JsonProperty parameters and without JsonCreator won't work. |
@lpandzic Right, a unit test could work. There are couple of tests that implement mock |
Fixes #1631.
The tests for this are in the parameter names module.