fix: add guard against the ArrayIndexOutOfBoundsException in BaggageCodec…#7239
Merged
jkwatson merged 4 commits intoopen-telemetry:mainfrom Aug 26, 2025
Merged
fix: add guard against the ArrayIndexOutOfBoundsException in BaggageCodec…#7239jkwatson merged 4 commits intoopen-telemetry:mainfrom
jkwatson merged 4 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7239 +/- ##
============================================
- Coverage 90.04% 90.03% -0.01%
- Complexity 6907 6909 +2
============================================
Files 787 787
Lines 20853 20855 +2
Branches 2023 2025 +2
============================================
Hits 18777 18777
- Misses 1439 1441 +2
Partials 637 637 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
breedx-splk
reviewed
Apr 2, 2025
| @@ -36,7 +36,6 @@ void shouldDecodePercentEncodedValues(String percentEncoded, String expectedDeco | |||
|
|
|||
| @Test | |||
| void shouldThrowIfMalformedData() { | |||
Contributor
There was a problem hiding this comment.
Let's rename this because the behavior has changed. 👍🏻
breedx-splk
reviewed
Apr 2, 2025
| void shouldThrowIfMalformedData() { | ||
| assertThatThrownBy(() -> BaggageCodec.decode("%1", StandardCharsets.UTF_8)) | ||
| .isInstanceOf(IllegalArgumentException.class); | ||
| assertThatNoException().isThrownBy(() -> BaggageCodec.decode("%1", StandardCharsets.UTF_8)); |
Contributor
There was a problem hiding this comment.
Can we also add a few chars and make sure that they come through in the output? In other words, lets assert on the result in addition to no exception being thrown. Thanks!
breedx-splk
approved these changes
Aug 25, 2025
Contributor
breedx-splk
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
jkwatson
approved these changes
Aug 26, 2025
the-clam
pushed a commit
to the-clam/opentelemetry-java
that referenced
this pull request
Nov 6, 2025
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.
added guard against the ArrayIndexOutOfBoundsException in BaggageCodec class