Remove unnecessary optional injection of ScriptService into NodeService

This commit is contained in:
Ryan Ernst 2016-07-01 09:31:41 -07:00
parent 65c9b0b588
commit 76ba10bab6
1 changed files with 2 additions and 8 deletions

View File

@ -74,7 +74,7 @@ public class NodeService extends AbstractComponent implements Closeable {
@Inject @Inject
public NodeService(Settings settings, ThreadPool threadPool, MonitorService monitorService, public NodeService(Settings settings, ThreadPool threadPool, MonitorService monitorService,
Discovery discovery, TransportService transportService, IndicesService indicesService, Discovery discovery, TransportService transportService, IndicesService indicesService,
PluginsService pluginService, CircuitBreakerService circuitBreakerService, PluginsService pluginService, CircuitBreakerService circuitBreakerService, ScriptService scriptService,
IngestService ingestService, ClusterService clusterService, SettingsFilter settingsFilter) { IngestService ingestService, ClusterService clusterService, SettingsFilter settingsFilter) {
super(settings); super(settings);
this.threadPool = threadPool; this.threadPool = threadPool;
@ -87,17 +87,11 @@ public class NodeService extends AbstractComponent implements Closeable {
this.clusterService = clusterService; this.clusterService = clusterService;
this.ingestService = ingestService; this.ingestService = ingestService;
this.settingsFilter = settingsFilter; this.settingsFilter = settingsFilter;
this.scriptService = scriptService;
clusterService.add(ingestService.getPipelineStore()); clusterService.add(ingestService.getPipelineStore());
clusterService.add(ingestService.getPipelineExecutionService()); 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) { public void setHttpServer(@Nullable HttpServer httpServer) {
this.httpServer = httpServer; this.httpServer = httpServer;
} }