Configure jsonSchema2Pojo to not initialize collections#8356
Open
jack-berg wants to merge 1 commit intoopen-telemetry:mainfrom
Open
Configure jsonSchema2Pojo to not initialize collections#8356jack-berg wants to merge 1 commit intoopen-telemetry:mainfrom
jack-berg wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
jack-berg
commented
May 1, 2026
| Arguments.of(new ViewStreamModel().withAttributeKeys(null), View.builder().build()), | ||
| // attribute_keys with only included (no excluded) - reproduces | ||
| // https://github.com/open-telemetry/opentelemetry-java/issues/8337 | ||
| Arguments.of( |
Member
Author
There was a problem hiding this comment.
This new test case fails without the change to build.gradle.kts.
Refactored these tests to follow the parameterized test pattern used elsewhere in these declarative config factory tests.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8356 +/- ##
============================================
+ Coverage 90.82% 90.85% +0.03%
- Complexity 7927 7936 +9
============================================
Files 895 895
Lines 23872 23872
Branches 2378 2378
============================================
+ Hits 21681 21690 +9
Misses 1446 1446
+ Partials 745 736 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Fixes #8337.
Currently, all collection types in generated pojos initialize to
new ArrayList<>(). This prevents us from being able to differentiate between null and empty, which is key to implementing declarative config semantics.