Skip to content

Commit 5c96a7e

Browse files
committed
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.
1 parent e225f08 commit 5c96a7e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
import java.util.HashSet;
4343
import java.util.List;
4444
import java.util.Map;
45-
import java.util.Set;
4645
import java.util.concurrent.CopyOnWriteArrayList;
4746
import java.util.concurrent.CountDownLatch;
4847
import java.util.concurrent.TimeUnit;
@@ -869,7 +868,7 @@ public void testRemoteClusterServiceNotEnabledGetCollectNodes() {
869868
service.acceptIncomingRequests();
870869
final IllegalArgumentException e = expectThrows(
871870
IllegalArgumentException.class,
872-
() -> service.getRemoteClusterService().collectNodes(Set.of(), ActionListener.wrap(r -> {}, r -> {})));
871+
() -> service.getRemoteClusterService().collectNodes(Collections.emptySet(), ActionListener.wrap(r -> {}, r -> {})));
873872
assertThat(e.getMessage(), equalTo("remote cluster service is not enabled"));
874873
}
875874
}

0 commit comments

Comments
 (0)