Skip to content

Commit 8fa0d97

Browse files
authored
MINOR: Fix typo in ApiKeyVersionsProvider exception message (#19521)
This patch addresses issue #19516 and corrects a typo in `ApiKeyVersionsProvider`: when `toVersion` exceeds `latestVersion`, the `IllegalArgumentException` message was erroneously formatted with `fromVersion`. The format argument has been updated to use `toVersion` so that the error message reports the correct value. Reviewers: Ken Huang <[email protected]>, PoAn Yang <[email protected]>, Jhen-Yung Hsu <[email protected]>, Chia-Ping Tsai <[email protected]>
1 parent ed79212 commit 8fa0d97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clients/src/test/java/org/apache/kafka/common/utils/annotation/ApiKeyVersionsProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void accept(ApiKeyVersionsSource source) {
5252

5353
if (toVersion > latestVersion) {
5454
throw new IllegalArgumentException(String.format("The toVersion %s is newer than the latest version %s",
55-
fromVersion, latestVersion));
55+
toVersion, latestVersion));
5656
}
5757
}
5858

0 commit comments

Comments
 (0)