-
Notifications
You must be signed in to change notification settings - Fork 881
fix: add guard against the ArrayIndexOutOfBoundsException in BaggageCodec… #7239
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll 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:
|
@@ -36,7 +36,6 @@ void shouldDecodePercentEncodedValues(String percentEncoded, String expectedDeco | |||
|
|||
@Test | |||
void shouldThrowIfMalformedData() { |
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 rename this because the behavior has changed. 👍🏻
@@ -36,7 +36,6 @@ void shouldDecodePercentEncodedValues(String percentEncoded, String expectedDeco | |||
|
|||
@Test | |||
void shouldThrowIfMalformedData() { | |||
assertThatThrownBy(() -> BaggageCodec.decode("%1", StandardCharsets.UTF_8)) | |||
.isInstanceOf(IllegalArgumentException.class); | |||
assertThatNoException().isThrownBy(() -> BaggageCodec.decode("%1", StandardCharsets.UTF_8)); |
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.
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!
added guard against the ArrayIndexOutOfBoundsException in BaggageCodec class