From 76ba10bab67c432b3ea3fddbaa897b0d3dad11f2 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 1 Jul 2016 09:31:41 -0700 Subject: [PATCH] Remove unnecessary optional injection of ScriptService into NodeService --- .../org/elasticsearch/node/service/NodeService.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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; }