fix(config): Move ObjectMapper to internal YamlObjectMapper class#8075
Open
MikeGoldsmith wants to merge 1 commit intoopen-telemetry:mainfrom
Open
fix(config): Move ObjectMapper to internal YamlObjectMapper class#8075MikeGoldsmith wants to merge 1 commit intoopen-telemetry:mainfrom
MikeGoldsmith wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
Spring starter needs same ObjectMapper config but can't access package-private field without reflection. New public internal class provides access. Fixes open-telemetry#7843
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8075 +/- ##
=========================================
Coverage 90.20% 90.20%
- Complexity 7593 7595 +2
=========================================
Files 841 842 +1
Lines 22913 22915 +2
Branches 2289 2289
=========================================
+ Hits 20668 20670 +2
Misses 1529 1529
Partials 716 716 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
@zeitlinger / @trask is this still needed from the instrumentation side? The last comment in the issue indicates a preference for copy / paste rather than letting consumers leverage the same object mapper:
My perspective: in addition to not relying on internal APIs, I don't like being in the business of having an API (public or internal) to access a jackson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves ObjectMapper configuration from package-private field in
DeclarativeConfigurationto new public internal classYamlObjectMapper. Spring starter and other external code can now access the configured ObjectMapper without reflection.Fixes #7843
Changes
YamlObjectMapperininternalpackage with singletongetInstance()methodDeclarativeConfigurationto useYamlObjectMapper.getInstance()instead of staticMAPPERfieldDeclarativeConfigurationTesting