Skip to content

Commit 9046912

Browse files
author
Christoph Büscher
authored
Fix eclipse compile issues (#29056)
Eclipse Oxygen doesn't seem to be able to infer the correct type arguments for Arrays::asList in the given test context. Adding cast to make this more explicit.
1 parent d3d7c04 commit 9046912

File tree

1 file changed

+3
-3
lines changed
  • libs/elasticsearch-core/src/test/java/org/elasticsearch/core/internal/io

1 file changed

+3
-3
lines changed

libs/elasticsearch-core/src/test/java/org/elasticsearch/core/internal/io/IOUtilsTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void testCloseArray() throws IOException {
5353
}
5454

5555
public void testCloseIterable() throws IOException {
56-
runTestClose(Arrays::asList, IOUtils::close);
56+
runTestClose((Function<Closeable[], List<Closeable>>) Arrays::asList, IOUtils::close);
5757
}
5858

5959
private <T> void runTestClose(final Function<Closeable[], T> function, final CheckedConsumer<T, IOException> close) throws IOException {
@@ -74,7 +74,7 @@ public void testCloseArrayWithIOExceptions() throws IOException {
7474
}
7575

7676
public void testCloseIterableWithIOExceptions() throws IOException {
77-
runTestCloseWithIOExceptions(Arrays::asList, IOUtils::close);
77+
runTestCloseWithIOExceptions((Function<Closeable[], List<Closeable>>) Arrays::asList, IOUtils::close);
7878
}
7979

8080
private <T> void runTestCloseWithIOExceptions(
@@ -113,7 +113,7 @@ public void testDeleteFilesIgnoringExceptionsArray() throws IOException {
113113
}
114114

115115
public void testDeleteFilesIgnoringExceptionsIterable() throws IOException {
116-
runDeleteFilesIgnoringExceptionsTest(Arrays::asList, IOUtils::deleteFilesIgnoringExceptions);
116+
runDeleteFilesIgnoringExceptionsTest((Function<Path[], List<Path>>) Arrays::asList, IOUtils::deleteFilesIgnoringExceptions);
117117
}
118118

119119
private <T> void runDeleteFilesIgnoringExceptionsTest(

0 commit comments

Comments
 (0)