diff --git a/core/src/main/java/org/elasticsearch/node/service/NodeService.java b/core/src/main/java/org/elasticsearch/node/service/NodeService.java index 79fbb24a177..103ee73a1e9 100644 --- a/core/src/main/java/org/elasticsearch/node/service/NodeService.java +++ b/core/src/main/java/org/elasticsearch/node/service/NodeService.java @@ -74,7 +74,7 @@ public class NodeService extends AbstractComponent implements Closeable { @Inject public NodeService(Settings settings, ThreadPool threadPool, MonitorService monitorService, Discovery discovery, TransportService transportService, IndicesService indicesService, - PluginsService pluginService, CircuitBreakerService circuitBreakerService, + PluginsService pluginService, CircuitBreakerService circuitBreakerService, ScriptService scriptService, IngestService ingestService, ClusterService clusterService, SettingsFilter settingsFilter) { super(settings); this.threadPool = threadPool; @@ -87,17 +87,11 @@ public class NodeService extends AbstractComponent implements Closeable { this.clusterService = clusterService; this.ingestService = ingestService; this.settingsFilter = settingsFilter; + this.scriptService = scriptService; clusterService.add(ingestService.getPipelineStore()); clusterService.add(ingestService.getPipelineExecutionService()); } - // can not use constructor injection or there will be a circular dependency - // nocommit: try removing this... - @Inject(optional = true) - public void setScriptService(ScriptService scriptService) { - this.scriptService = scriptService; - } - public void setHttpServer(@Nullable HttpServer httpServer) { this.httpServer = httpServer; }