From 79d3415210247fad7970b4088bfef0391ff189b6 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Wed, 13 Apr 2016 21:38:17 -0400 Subject: [PATCH] Help JDK 9 type inference in ShardStateIT.java The JDK 9 compiler type inference gets confused, so we need to help it here. --- .../cluster/routing/allocation/ShardStateIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java index 3bc8cfa55a1..7e05448bf91 100644 --- a/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java +++ b/core/src/test/java/org/elasticsearch/cluster/routing/allocation/ShardStateIT.java @@ -50,8 +50,8 @@ public class ShardStateIT extends ESIntegTestCase { logger.info("--> waiting for a yellow index"); // JDK 9 type inference gets confused, so we have to help the // type inference - assertBusy(() -> assertThat(client().admin().cluster().prepareHealth().get().getStatus(), - equalTo(ClusterHealthStatus.YELLOW))); + assertBusy(((Runnable) () -> assertThat(client().admin().cluster().prepareHealth().get().getStatus(), + equalTo(ClusterHealthStatus.YELLOW)))); final long term0 = shard == 0 ? 2 : 1; final long term1 = shard == 1 ? 2 : 1;