Help Eclipse infering lambda parameter types (#40747)
The Eclipse compiler (4.10, Photon) cannot build this test because it cannot correctly infer the type arguments of the functions. Explicitely adding them helps in this case.
This commit is contained in:
parent
3844da318f
commit
89389197b3
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue