From 5c40fc9ba5e470b13d04882e9653aa772fd45039 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Sat, 20 Apr 2019 08:22:56 -0400 Subject: [PATCH] Remove script engine from X-Pack plugin (#41387) The X-Pack plugin implements ScriptEngine yet it does not actually implement any of the methods on the interface, effectively making this a no-op. This commit removes this interface from the X-Pack plugin. --- .../main/java/org/elasticsearch/xpack/core/XPackPlugin.java | 5 ++--- .../xpack/core/LocalStateCompositeXPackPlugin.java | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java index bc861b3904f..b57b648b765 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java @@ -5,8 +5,8 @@ */ package org.elasticsearch.xpack.core; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.apache.lucene.util.SetOnce; import org.elasticsearch.SpecialPermission; import org.elasticsearch.Version; @@ -49,7 +49,6 @@ import org.elasticsearch.persistent.PersistentTaskParams; import org.elasticsearch.plugins.EnginePlugin; import org.elasticsearch.plugins.ExtensiblePlugin; import org.elasticsearch.plugins.RepositoryPlugin; -import org.elasticsearch.plugins.ScriptPlugin; import org.elasticsearch.repositories.Repository; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestHandler; @@ -86,7 +85,7 @@ import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.StreamSupport; -public class XPackPlugin extends XPackClientPlugin implements ScriptPlugin, ExtensiblePlugin, RepositoryPlugin, EnginePlugin { +public class XPackPlugin extends XPackClientPlugin implements ExtensiblePlugin, RepositoryPlugin, EnginePlugin { private static Logger logger = LogManager.getLogger(XPackPlugin.class); private static DeprecationLogger deprecationLogger = new DeprecationLogger(logger); diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java index 1dd07a5df81..9b5414a6f83 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/LocalStateCompositeXPackPlugin.java @@ -256,7 +256,6 @@ public class LocalStateCompositeXPackPlugin extends XPackPlugin implements Scrip @Override public List> getContexts() { List> contexts = new ArrayList<>(); - contexts.addAll(super.getContexts()); filterPlugins(ScriptPlugin.class).stream().forEach(p -> contexts.addAll(p.getContexts())); return contexts; }