diff --git a/server/src/test/java/org/elasticsearch/BuildTests.java b/server/src/test/java/org/elasticsearch/BuildTests.java index 12af1d31841..f1d48c08b39 100644 --- a/server/src/test/java/org/elasticsearch/BuildTests.java +++ b/server/src/test/java/org/elasticsearch/BuildTests.java @@ -162,8 +162,9 @@ public class BuildTests extends ESTestCase { EqualsHashCodeTestUtils.checkEqualsAndHashCode(new WriteableBuild(new Build( randomFrom(Build.Flavor.values()), randomFrom(Build.Type.values()), randomAlphaOfLength(6), randomAlphaOfLength(6), randomBoolean(), randomAlphaOfLength(6))), - b -> copyWriteable(b, writableRegistry(), WriteableBuild::new, Version.CURRENT), - b -> { + // Note: the cast of the Copy- and MutateFunction is needed for some IDE (specifically Eclipse 4.10.0) to infer the right type + (WriteableBuild b) -> copyWriteable(b, writableRegistry(), WriteableBuild::new, Version.CURRENT), + (WriteableBuild b) -> { switch (randomIntBetween(1, 6)) { case 1: return new WriteableBuild(new Build(