From f3106de23ff638ae5d62bdcb4495dc0e2fe77ff7 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sun, 18 Sep 2011 21:51:42 +0300 Subject: [PATCH] suppress unchecked compile warnings --- .../script/groovy/GroovyScriptEngineService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/lang/groovy/src/main/java/org/elasticsearch/script/groovy/GroovyScriptEngineService.java b/plugins/lang/groovy/src/main/java/org/elasticsearch/script/groovy/GroovyScriptEngineService.java index f34af7acc58..5fedebc761f 100644 --- a/plugins/lang/groovy/src/main/java/org/elasticsearch/script/groovy/GroovyScriptEngineService.java +++ b/plugins/lang/groovy/src/main/java/org/elasticsearch/script/groovy/GroovyScriptEngineService.java @@ -38,7 +38,6 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicLong; /** - * @author kimchy (shay.banon) */ public class GroovyScriptEngineService extends AbstractComponent implements ScriptEngineService { @@ -83,6 +82,7 @@ public class GroovyScriptEngineService extends AbstractComponent implements Scri } } + @SuppressWarnings({"unchecked"}) @Override public SearchScript search(Object compiledScript, SearchLookup lookup, @Nullable Map vars) { try { Class scriptClass = (Class) compiledScript; @@ -127,6 +127,7 @@ public class GroovyScriptEngineService extends AbstractComponent implements Scri this.script = script; } + @SuppressWarnings({"unchecked"}) @Override public void setNextVar(String name, Object value) { script.getBinding().getVariables().put(name, value); } @@ -163,10 +164,12 @@ public class GroovyScriptEngineService extends AbstractComponent implements Scri lookup.setNextDocId(doc); } + @SuppressWarnings({"unchecked"}) @Override public void setNextScore(float score) { script.getBinding().getVariables().put("_score", score); } + @SuppressWarnings({"unchecked"}) @Override public void setNextVar(String name, Object value) { script.getBinding().getVariables().put(name, value); }