Skip to content

Commit 014231c

Browse files
authored
Align TransportVersion#bestKnownVersion with 8.x (#123801) (#123976)
In backporting #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 3c08f6a commit 014231c

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)