Flink: Fix checkArgument message for flink streaming#15907
Open
genxiong7 wants to merge 1 commit intoapache:mainfrom
Open
Flink: Fix checkArgument message for flink streaming#15907genxiong7 wants to merge 1 commit intoapache:mainfrom
genxiong7 wants to merge 1 commit intoapache:mainfrom
Conversation
f92878d to
6e83390
Compare
singhpk234
approved these changes
Apr 7, 2026
ebyhr
approved these changes
Apr 7, 2026
ebyhr
reviewed
Apr 8, 2026
Member
There was a problem hiding this comment.
nit: The checkArgument method supports a string template, so there's no need to use String.format on the caller side:
checkArgument(boolean expression, String errorMessageTemplate, @Nullable Object... errorMessageArgs)Please feel free to ignore this comment since it's unrelated to the error message change.
Author
There was a problem hiding this comment.
Thanks for the suggestion. I’ve updated it accordingly.
dramaticlly
approved these changes
Apr 8, 2026
7733176 to
d92dd5f
Compare
Guosmilesmile
approved these changes
Apr 9, 2026
mxm
reviewed
Apr 9, 2026
| Preconditions.checkArgument( | ||
| startSnapshotId == null, | ||
| "Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_ID strategy: not null"); | ||
| "Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_TIMESTAMP strategy: not null"); |
Contributor
There was a problem hiding this comment.
Suggested change
| "Invalid starting snapshot id for SPECIFIC_START_SNAPSHOT_TIMESTAMP strategy: not null"); | |
| "Invalid starting snapshot id for %s strategy: not null", startingStrategy); |
Let's interpolate the string to prevent copy/paste issues in the future.
Author
There was a problem hiding this comment.
Makes sense. Fixed by interpolating the string, and also corrected the mismatch between the error message and the strategy name.
251676f to
2d39682
Compare
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.
This is a small follow-up fix for the Flink streaming error message. The change is limited to the message text.