Skip to content

Commit eb1ed2a

Browse files
committed
Compilation fixes for 7.x
1 parent d8f1735 commit eb1ed2a

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/plugin/EqlPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ public class EqlPlugin extends Plugin implements ActionPlugin {
5050
@Override
5151
public List<Setting<?>> getSettings() {
5252
if (isSnapshot()) {
53-
return List.of(EQL_ENABLED_SETTING);
53+
return Collections.singletonList(EQL_ENABLED_SETTING);
5454
} else {
55-
return List.of();
55+
return Collections.emptyList();
5656
}
5757
}
5858

x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/plugin/RestEqlSearchAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient cli
4545
eqlRequest.indices(Strings.splitStringByCommaToArray(request.param("index")));
4646
}
4747

48-
return channel -> client.execute(EqlSearchAction.INSTANCE, eqlRequest, new RestResponseListener<>(channel) {
48+
return channel -> client.execute(EqlSearchAction.INSTANCE, eqlRequest, new RestResponseListener<EqlSearchResponse>(channel) {
4949
@Override
5050
public RestResponse buildResponse(EqlSearchResponse response) throws Exception {
5151
XContentBuilder builder = channel.newBuilder(request.getXContentType(), XContentType.JSON, true);

x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/plugin/TransportEqlSearchAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ static EqlSearchResponse createResponse(EqlSearchRequest request) {
5454
// Stubbed search response
5555
// TODO: implement actual search response processing once the parser/executor is in place
5656
List<SearchHit> events = Arrays.asList(
57-
new SearchHit(1, "111", null),
58-
new SearchHit(2, "222", null)
57+
new SearchHit(1, "111", null, null),
58+
new SearchHit(2, "222", null, null)
5959
);
6060
EqlSearchResponse.Hits hits = new EqlSearchResponse.Hits(null, Arrays.asList(
6161
new EqlSearchResponse.Sequence(Collections.singletonList("4021"), events),

x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/action/EqlRequestParserTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.elasticsearch.test.ESTestCase;
1717

1818
import java.io.IOException;
19-
import java.util.List;
19+
import java.util.Collections;
2020
import java.util.function.Consumer;
2121
import java.util.function.Function;
2222

@@ -25,7 +25,7 @@
2525
public class EqlRequestParserTests extends ESTestCase {
2626

2727
private static NamedXContentRegistry registry =
28-
new NamedXContentRegistry(new SearchModule(Settings.EMPTY, List.of()).getNamedXContents());
28+
new NamedXContentRegistry(new SearchModule(Settings.EMPTY, false, Collections.emptyList()).getNamedXContents());
2929
public void testUnknownFieldParsingErrors() throws IOException {
3030
assertParsingErrorMessage("{\"key\" : \"value\"}", "unknown field [key]", EqlSearchRequest::fromXContent);
3131
}

x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/action/EqlSearchRequestTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ public void setup() {
4646

4747
@Override
4848
protected NamedWriteableRegistry getNamedWriteableRegistry() {
49-
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
49+
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
5050
return new NamedWriteableRegistry(searchModule.getNamedWriteables());
5151
}
5252

5353
@Override
5454
protected NamedXContentRegistry xContentRegistry() {
55-
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
55+
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
5656
return new NamedXContentRegistry(searchModule.getNamedXContents());
5757
}
5858

x-pack/plugin/eql/src/test/java/org/elasticsearch/xpack/eql/action/EqlSearchResponseTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static List<SearchHit> randomEvents() {
2424
if (randomBoolean()) {
2525
hits = new ArrayList<>();
2626
for (int i = 0; i < size; i++) {
27-
hits.add(new SearchHit(i, randomAlphaOfLength(10), new HashMap<>()));
27+
hits.add(new SearchHit(i, randomAlphaOfLength(10), null, new HashMap<>()));
2828
}
2929
}
3030
if (randomBoolean()) {

0 commit comments

Comments
 (0)