Skip to content

Commit

Permalink
Revert original change
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-ivanov-es committed Nov 28, 2024
1 parent 6b77491 commit 2ede389
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,7 @@ public static TransportVersion randomVersionBetween(
}
int maxVersionIndex = ALL_VERSIONS.size() - 1;
if (maxVersion != null) {
// current version might be serverless one and therefore might be after the last version in ALL_VERSIONS
if (maxVersion.after(ALL_VERSIONS.getLast()) && maxVersion.onOrBefore(TransportVersion.current())) {
maxVersionIndex = ALL_VERSIONS.size() - 1;
} else {
maxVersionIndex = Collections.binarySearch(ALL_VERSIONS, maxVersion);
}
maxVersionIndex = Collections.binarySearch(ALL_VERSIONS, maxVersion);
}
if (minVersionIndex < 0) {
throw new IllegalArgumentException("minVersion [" + minVersion + "] does not exist.");
Expand Down

0 comments on commit 2ede389

Please sign in to comment.