File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
main/java/org/elasticsearch
test/java/org/elasticsearch Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public static IntFunction<String> generateVersionsLookup(Class<?> versionContain
53
53
54
54
NavigableMap <Integer , List <Version >> versions = new TreeMap <>();
55
55
// add the current version id, which won't be in the csv
56
- versions .put (current , List . of (Version .CURRENT ) );
56
+ versions .computeIfAbsent (current , k -> new ArrayList <>()). add (Version .CURRENT );
57
57
58
58
try (BufferedReader reader = new BufferedReader (new InputStreamReader (versionsFile , StandardCharsets .UTF_8 ))) {
59
59
String line ;
Original file line number Diff line number Diff line change 19
19
import java .util .regex .Pattern ;
20
20
21
21
import static org .hamcrest .Matchers .containsString ;
22
+ import static org .hamcrest .Matchers .endsWith ;
22
23
import static org .hamcrest .Matchers .equalTo ;
23
24
import static org .hamcrest .Matchers .greaterThan ;
24
25
import static org .hamcrest .Matchers .is ;
@@ -187,7 +188,7 @@ public void testCURRENTIsLatest() {
187
188
}
188
189
189
190
public void testToReleaseVersion () {
190
- assertThat (TransportVersion .current ().toReleaseVersion (), equalTo (Version .CURRENT .toString ()));
191
+ assertThat (TransportVersion .current ().toReleaseVersion (), endsWith (Version .CURRENT .toString ()));
191
192
}
192
193
193
194
public void testToString () {
You can’t perform that action at this time.
0 commit comments