Skip to content

Commit 84d101b

Browse files
committed
Updated REST handlers to conform to changes in abstract class org.elasticsearch.rest.BaseRestHandler as of Elasticsearch 7.4.0. No plan to support compatibility with versions prior to Elasticsearch 7.4.0.
1 parent 7374a63 commit 84d101b

File tree

8 files changed

+18
-40
lines changed

8 files changed

+18
-40
lines changed

.travis.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,14 @@ jdk:
33
- oraclejdk11
44
env:
55
matrix:
6-
- ELASTICSEARCH_VERSION=7.3.2
7-
- ELASTICSEARCH_VERSION=7.3.1
8-
- ELASTICSEARCH_VERSION=7.3.0
9-
- ELASTICSEARCH_VERSION=7.2.1
10-
- ELASTICSEARCH_VERSION=7.2.0
11-
- ELASTICSEARCH_VERSION=7.1.1
12-
- ELASTICSEARCH_VERSION=7.1.0
13-
- ELASTICSEARCH_VERSION=7.0.1
14-
- ELASTICSEARCH_VERSION=7.0.0
15-
- ELASTICSEARCH_VERSION=6.8.2
16-
- ELASTICSEARCH_VERSION=6.8.1
17-
- ELASTICSEARCH_VERSION=6.8.0
18-
- ELASTICSEARCH_VERSION=6.7.2
19-
- ELASTICSEARCH_VERSION=6.7.1
20-
- ELASTICSEARCH_VERSION=6.7.0
21-
- ELASTICSEARCH_VERSION=6.6.2
22-
- ELASTICSEARCH_VERSION=6.6.1
23-
- ELASTICSEARCH_VERSION=6.6.0
24-
- ELASTICSEARCH_VERSION=6.5.4
25-
- ELASTICSEARCH_VERSION=6.5.3
26-
- ELASTICSEARCH_VERSION=6.5.2
27-
- ELASTICSEARCH_VERSION=6.5.1
28-
- ELASTICSEARCH_VERSION=6.5.0
6+
- ELASTICSEARCH_VERSION=7.6.1
7+
- ELASTICSEARCH_VERSION=7.6.0
8+
- ELASTICSEARCH_VERSION=7.5.2
9+
- ELASTICSEARCH_VERSION=7.5.1
10+
- ELASTICSEARCH_VERSION=7.5.0
11+
- ELASTICSEARCH_VERSION=7.4.2
12+
- ELASTICSEARCH_VERSION=7.4.1
13+
- ELASTICSEARCH_VERSION=7.4.0
2914

3015
script: "mvn clean install -Delasticsearch.version=${ELASTICSEARCH_VERSION}"
3116

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<zentity.website>https://zentity.io</zentity.website>
1717
<zentity.version>1.5.1</zentity.version>
1818
<!-- dependency versions -->
19-
<elasticsearch.version>7.3.2</elasticsearch.version>
19+
<elasticsearch.version>7.6.0</elasticsearch.version>
2020
<jackson.core.version>2.9.9</jackson.core.version>
2121
<jackson.databind.version>2.9.9.2</jackson.databind.version>
2222
<jdk.version>1.11</jdk.version>

src/main/java/org/elasticsearch/plugin/zentity/HomeAction.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import org.elasticsearch.client.node.NodeClient;
44
import org.elasticsearch.common.inject.Inject;
5-
import org.elasticsearch.common.settings.Settings;
65
import org.elasticsearch.common.xcontent.XContentBuilder;
76
import org.elasticsearch.common.xcontent.XContentFactory;
87
import org.elasticsearch.rest.BaseRestHandler;
@@ -18,8 +17,7 @@
1817
public class HomeAction extends BaseRestHandler {
1918

2019
@Inject
21-
public HomeAction(Settings settings, RestController controller) {
22-
super(settings);
20+
public HomeAction(RestController controller) {
2321
controller.registerHandler(GET, "_zentity", this);
2422
}
2523

src/main/java/org/elasticsearch/plugin/zentity/ModelsAction.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.elasticsearch.action.search.SearchResponse;
1616
import org.elasticsearch.client.node.NodeClient;
1717
import org.elasticsearch.common.inject.Inject;
18-
import org.elasticsearch.common.settings.Settings;
1918
import org.elasticsearch.common.xcontent.ToXContent;
2019
import org.elasticsearch.common.xcontent.XContentBuilder;
2120
import org.elasticsearch.common.xcontent.XContentFactory;
@@ -38,8 +37,7 @@ public class ModelsAction extends BaseRestHandler {
3837
public static final String INDEX_NAME = ".zentity-models";
3938

4039
@Inject
41-
public ModelsAction(Settings settings, RestController controller) {
42-
super(settings);
40+
public ModelsAction(RestController controller) {
4341
controller.registerHandler(GET, "_zentity/models", this);
4442
controller.registerHandler(GET, "_zentity/models/{entity_type}", this);
4543
controller.registerHandler(POST, "_zentity/models/{entity_type}", this);

src/main/java/org/elasticsearch/plugin/zentity/ResolutionAction.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import org.elasticsearch.action.get.GetResponse;
88
import org.elasticsearch.client.node.NodeClient;
99
import org.elasticsearch.common.inject.Inject;
10-
import org.elasticsearch.common.settings.Settings;
1110
import org.elasticsearch.rest.BaseRestHandler;
1211
import org.elasticsearch.rest.BytesRestResponse;
1312
import org.elasticsearch.rest.RestController;
@@ -19,8 +18,7 @@
1918
public class ResolutionAction extends BaseRestHandler {
2019

2120
@Inject
22-
ResolutionAction(Settings settings, RestController controller) {
23-
super(settings);
21+
ResolutionAction(RestController controller) {
2422
controller.registerHandler(POST, "_zentity/resolution", this);
2523
controller.registerHandler(POST, "_zentity/resolution/{entity_type}", this);
2624
}

src/main/java/org/elasticsearch/plugin/zentity/SetupAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public class SetupAction extends BaseRestHandler {
4848
"}";
4949

5050
@Inject
51-
public SetupAction(Settings settings, RestController controller) {
52-
super(settings);
51+
public SetupAction(RestController controller) {
5352
controller.registerHandler(POST, "_zentity/_setup", this);
5453
}
5554

src/main/java/org/elasticsearch/plugin/zentity/ZentityPlugin.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public List<RestHandler> getRestHandlers(
7070
IndexNameExpressionResolver indexNameExpressionResolver,
7171
Supplier<DiscoveryNodes> nodesInCluster) {
7272
List<RestHandler> handlers = new ArrayList<RestHandler>() {{
73-
new HomeAction(settings, restController);
74-
new ModelsAction(settings, restController);
75-
new ResolutionAction(settings, restController);
76-
new SetupAction(settings, restController);
73+
new HomeAction(restController);
74+
new ModelsAction(restController);
75+
new ResolutionAction(restController);
76+
new SetupAction(restController);
7777
}};
7878
return handlers;
7979
}

src/test/ant/integration-tests.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
<run-script script="@{home}/bin/elasticsearch"
122122
spawn="@{spawn}">
123123
<nested>
124-
<arg value="-Epidfile=@{es.pidfile}"/>
124+
<arg value="-p=@{es.pidfile}"/>
125125
<arg value="-Ecluster.name=@{es.cluster.name}"/>
126126
<arg value="-Ehttp.port=@{es.http.port}"/>
127127
<arg value="-Etransport.tcp.port=@{es.transport.tcp.port}"/>

0 commit comments

Comments
 (0)