diff --git a/plugin/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java index b9fd59ecef5..59f470d71a3 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/watcher/Watcher.java @@ -182,11 +182,11 @@ public class Watcher implements ActionPlugin { public static final Setting MAX_STOP_TIMEOUT_SETTING = Setting.timeSetting("xpack.watcher.stop.timeout", TimeValue.timeValueSeconds(30), Setting.Property.NodeScope); - public static final ScriptContext SCRIPT_SEARCH_CONTEXT = - new ScriptContext<>("xpack", SearchScript.class, SearchScript.Compiled.class); + public static final ScriptContext SCRIPT_SEARCH_CONTEXT = + new ScriptContext<>("xpack", SearchScript.Compiled.class); // TODO: remove this context when each xpack script use case has their own contexts - public static final ScriptContext SCRIPT_EXECUTABLE_CONTEXT - = new ScriptContext<>("xpack_executable", ExecutableScript.class, ExecutableScript.Compiled.class); + public static final ScriptContext SCRIPT_EXECUTABLE_CONTEXT + = new ScriptContext<>("xpack_executable", ExecutableScript.Compiled.class); private static final Logger logger = Loggers.getLogger(Watcher.class); private WatcherIndexingListener listener; diff --git a/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateIT.java b/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateIT.java index 1d68bbfd3f1..91ba78930e0 100644 --- a/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateIT.java +++ b/qa/smoke-test-watcher-with-mustache/src/test/java/org/elasticsearch/smoketest/WatcherTemplateIT.java @@ -39,7 +39,7 @@ public class WatcherTemplateIT extends ESTestCase { public void init() throws Exception { MustacheScriptEngine engine = new MustacheScriptEngine(); Map engines = Collections.singletonMap(engine.getType(), engine); - Map> contexts = + Map> contexts = Collections.singletonMap(Watcher.SCRIPT_EXECUTABLE_CONTEXT.name, Watcher.SCRIPT_EXECUTABLE_CONTEXT); ScriptService scriptService = new ScriptService(Settings.EMPTY, engines, contexts); textTemplateEngine = new TextTemplateEngine(Settings.EMPTY, scriptService);