Skip to content

Commit 01460fa

Browse files
authored
Fix eclipse compilation (#66047)
Looks like we've hit another "funny" eclipse compiler error. I filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=569557 , but short version is that the following code compiles with javac and not eclipse: ``` package test; import java.util.function.Supplier; public class Test { private final Object o = new Object(); private class Inner { public Inner() { this(() -> o); } private Inner(Supplier<Object> o) {} } } ``` Specifically the outer class's `o` can't be refered to in the lambda. This stops us from doing that in ML so eclipse can be happy again.
1 parent 157679c commit 01460fa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/utils/persistence/ResultsPersisterService.java

+3
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ public SearchResponse searchWithRetry(SearchRequest searchRequest,
171171
SearchRetryableAction mlRetryableAction = new SearchRetryableAction(
172172
jobId,
173173
searchRequest,
174+
client,
174175
shouldRetry,
175176
retryMsgHandler,
176177
getResponse);
@@ -273,6 +274,8 @@ private class SearchRetryableAction extends MlRetryableAction<SearchRequest, Sea
273274
private final SearchRequest searchRequest;
274275
SearchRetryableAction(String jobId,
275276
SearchRequest searchRequest,
277+
// Pass the client to work around https://bugs.eclipse.org/bugs/show_bug.cgi?id=569557
278+
OriginSettingClient client,
276279
Supplier<Boolean> shouldRetry,
277280
Consumer<String> msgHandler,
278281
ActionListener<SearchResponse> listener) {

0 commit comments

Comments
 (0)