-
Notifications
You must be signed in to change notification settings - Fork 94
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 public JsonFactory factories to ObjectMappers #2586
Conversation
Generate changelog in
|
private static <F extends JsonFactory, B extends TSFBuilder<F, B>> B withDefaults(B builder) { | ||
return builder | ||
// Interning introduces excessive contention https://github.com/FasterXML/jackson-core/issues/946 | ||
.disable(JsonFactory.Feature.INTERN_FIELD_NAMES); | ||
} |
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.
Unclear if we want this to be public like withDefaultModules(ObjectMapper)
/etc. I opted to keep it private to push consumers toward concrete factories where we can add instrumentation.
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.
Based on some other usages, making this public seems beneficial to consolidate functionality
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.
Let's revisit making this public later on since the string length metrics from our concrete factories are valuable to capture in the short term, and using withDefaults
will bypass them.
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.
Looks good, defer to you if/when you want to make withDefaults
public for external consumption
private static <F extends JsonFactory, B extends TSFBuilder<F, B>> B withDefaults(B builder) { | ||
return builder | ||
// Interning introduces excessive contention https://github.com/FasterXML/jackson-core/issues/946 | ||
.disable(JsonFactory.Feature.INTERN_FIELD_NAMES); | ||
} |
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.
Based on some other usages, making this public seems beneficial to consolidate functionality
Released 7.47.0 |
==COMMIT_MSG==
Add public JsonFactory factories to ObjectMappers
==COMMIT_MSG==