[#8656] Improvement: Validate empty table updates in TableUpdatesRequest#10201
Merged
justinmclean merged 20 commits intoapache:mainfrom Mar 4, 2026
Merged
[#8656] Improvement: Validate empty table updates in TableUpdatesRequest#10201justinmclean merged 20 commits intoapache:mainfrom
justinmclean merged 20 commits intoapache:mainfrom
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…e Indexes overload
Adds a precondition in validate() to ensure the updates list is not empty. Also adds a unit test to verify IllegalArgumentException is thrown when updates are empty.
Member
|
Hi @A0R0P0I7T we use spotless to make sure code is consistently formatted. You'll need to run spotless and push your changes to fix the CI issue. |
Contributor
Author
Yes absolutely my apologies I didn't notice I had changed the version of my java which might have affected the |
Code Coverage Report
Files
|
justinmclean
approved these changes
Mar 4, 2026
Member
justinmclean
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for that
Contributor
Author
Thank you for the review and merge. |
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.
What changes were proposed in this pull request?
Adds validation in
TableUpdatesRequest.validate()to ensure that the updates list is not empty before applying table updates.If the list is empty, an IllegalArgumentException is thrown.\
Additionally, a unit test (
testValidateEmptyUpdates) is added to verify that the validation correctly throws an exception when an empty updates list is provided.Why are the changes needed?
Currently,
TableUpdatesRequest.validate()only checks that updates is not null.However, an empty list of updates is also invalid because a table update request without any updates should not be allowed.
This change ensures stronger validation and prevents invalid request from being processed.
Fix: #8656
Does this PR introduce any user-facing change?
No
How was this patch tested?
(Please test your changes, and provide instructions on how to test it:
Added a new unit test
testValidateEmptyUpdatesinTestTableUpdatesRequest.