Skip to content

Commit 0006d50

Browse files
committed
Align TransportVersion#bestKnownVersion with 8.x
In backporting elastic#123397 to 8.x we discovered that we needed to generalize `TransportVersion#bestKnownVersion` slightly to handle older versions. This commit forward-ports this change to keep the branches aligned.
1 parent 6d04ffd commit 0006d50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/TransportVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public boolean isKnown() {
131131
* there are no such versions.
132132
*/
133133
public TransportVersion bestKnownVersion() {
134-
if (VersionsHolder.ALL_VERSIONS_MAP.containsKey(id)) {
134+
if (isKnown()) {
135135
return this;
136136
}
137137
TransportVersion bestSoFar = TransportVersions.ZERO;

0 commit comments

Comments
 (0)