From 8425d26b70ae89c848865d276873c24155930592 Mon Sep 17 00:00:00 2001 From: javanna Date: Mon, 2 Nov 2015 15:27:56 +0100 Subject: [PATCH] use existing constant to check whether client is a transport client --- .../java/org/elasticsearch/plugin/ingest/IngestPlugin.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/IngestPlugin.java b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/IngestPlugin.java index 9dfbf314499..11365167732 100644 --- a/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/IngestPlugin.java +++ b/plugins/ingest/src/main/java/org/elasticsearch/plugin/ingest/IngestPlugin.java @@ -22,6 +22,7 @@ package org.elasticsearch.plugin.ingest; import org.elasticsearch.action.ActionModule; import org.elasticsearch.client.Client; +import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.common.component.LifecycleComponent; import org.elasticsearch.common.inject.Module; import org.elasticsearch.common.settings.Settings; @@ -56,7 +57,7 @@ public class IngestPlugin extends Plugin { public IngestPlugin(Settings nodeSettings) { this.nodeSettings = nodeSettings; - transportClient = "transport".equals(nodeSettings.get(Client.CLIENT_TYPE_SETTING)); + transportClient = TransportClient.CLIENT_TYPE.equals(nodeSettings.get(Client.CLIENT_TYPE_SETTING)); } @Override @@ -95,7 +96,7 @@ public class IngestPlugin extends Plugin { } public void onModule(ActionModule module) { - if (!transportClient) { + if (transportClient == false) { module.registerFilter(IngestActionFilter.class); } module.registerAction(PutPipelineAction.INSTANCE, PutPipelineTransportAction.class); @@ -108,5 +109,4 @@ public class IngestPlugin extends Plugin { restModule.addRestAction(RestGetPipelineAction.class); restModule.addRestAction(RestDeletePipelineAction.class); } - }