From 473e98981bcbac246ade6f27da13aa0238b0c8f5 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 21 Apr 2017 17:53:03 -0700 Subject: Scripts: Remove unnecessary executable shortcut (#24264) ScriptService has two executable methods, one which takes a CompiledScript, which is similar to search, and one that takes a raw Script and both compiles and returns an ExecutableScript for it. The latter is not needed, and the call sites which used one or the other were mixed. This commit removes the extra executable method in favor of callers first calling compile, then executable. --- .../elasticsearch/script/mustache/TransportSearchTemplateAction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/lang-mustache/src/main/java/org/elasticsearch') diff --git a/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java b/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java index d7b0406238..61f099f6c2 100644 --- a/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java +++ b/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/TransportSearchTemplateAction.java @@ -34,6 +34,7 @@ import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.query.QueryParseContext; +import org.elasticsearch.script.CompiledScript; import org.elasticsearch.script.ExecutableScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptService; @@ -71,7 +72,8 @@ public class TransportSearchTemplateAction extends HandledTransportAction