From 5c96a7e2104d4070a83aaf411cda32ae987982cf Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 23 Mar 2020 18:40:36 -0400 Subject: [PATCH] Fix compilation in RemoteClusterServiceTests This commit fixes an issue when a JDK collection convenience method not available in JDK 8 was backported to 7.x. --- .../org/elasticsearch/transport/RemoteClusterServiceTests.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java b/server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java index f676ebb46f2..b21a2134d26 100644 --- a/server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java +++ b/server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java @@ -42,7 +42,6 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -869,7 +868,7 @@ public class RemoteClusterServiceTests extends ESTestCase { service.acceptIncomingRequests(); final IllegalArgumentException e = expectThrows( IllegalArgumentException.class, - () -> service.getRemoteClusterService().collectNodes(Set.of(), ActionListener.wrap(r -> {}, r -> {}))); + () -> service.getRemoteClusterService().collectNodes(Collections.emptySet(), ActionListener.wrap(r -> {}, r -> {}))); assertThat(e.getMessage(), equalTo("remote cluster service is not enabled")); } }