[ISSUE #10835] fix(common): reject malformed topic config atomically - #11210
Open
beautyarbutin wants to merge 2 commits into
Open
beautyarbutin wants to merge 2 commits into
beautyarbutin wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #11210 +/- ##
=============================================
- Coverage 49.71% 49.62% -0.10%
+ Complexity 14346 14314 -32
=============================================
Files 1390 1390
Lines 103190 103197 +7
Branches 13493 13493
=============================================
- Hits 51301 51209 -92
- Misses 45721 45791 +70
- Partials 6168 6197 +29 ☔ View full report in Codecov by Harness. 🚀 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.
Which Issue(s) This PR Fixes
Brief Description
TopicConfig.decode()previously assignedtopicNamebefore parsing the mandatory numeric and enum fields. Invalid input could therefore throw and leave the existing object partially mutated.Parse all mandatory fields into local variables first, return
falseon invalid numeric or filter-type values, and update the object only after all mandatory fields are valid. Regression coverage verifies truncated input and each invalid mandatory field while comparing the complete original object state.This follows up on #10845, which was closed without being merged.
How Did You Test This Change?
mvn -B -ntp -pl common clean -DskipITs -Dtest=TopicConfigTest -Dspotbugs.skip=true testTopicConfigTest: 4 tests passed