Fix compilation in eclipse (#25107)

It looks like eclipse blows up when you take a method reference to
varargs method in a finally method:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=517951
This commit is contained in:
Nik Everett 2017-06-07 11:36:29 -04:00 committed by GitHub
parent 2057bbc6c5
commit 64cbb93727
1 changed files with 4 additions and 2 deletions

View File

@ -440,8 +440,10 @@ public class SearchIT extends ESRestHighLevelClientTestCase {
} finally {
ClearScrollRequest clearScrollRequest = new ClearScrollRequest();
clearScrollRequest.addScrollId(searchResponse.getScrollId());
ClearScrollResponse clearScrollResponse = execute(clearScrollRequest, highLevelClient()::clearScroll,
highLevelClient()::clearScrollAsync);
ClearScrollResponse clearScrollResponse = execute(clearScrollRequest,
// Not using a method reference to work around https://bugs.eclipse.org/bugs/show_bug.cgi?id=517951
(request, headers) -> highLevelClient().clearScroll(request, headers),
(request, listener, headers) -> highLevelClient().clearScrollAsync(request, listener, headers));
assertThat(clearScrollResponse.getNumFreed(), greaterThan(0));
assertTrue(clearScrollResponse.isSucceeded());