Skip to content

Commit

Permalink
Watcher: Remove unused local variable in doExecute (elastic#36655)
Browse files Browse the repository at this point in the history
  • Loading branch information
hub-cap committed Dec 20, 2018
1 parent 2e27468 commit c6e19f4
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
import org.elasticsearch.script.ScriptService;
import org.elasticsearch.xpack.core.watcher.condition.ExecutableCondition;
import org.elasticsearch.xpack.core.watcher.execution.WatchExecutionContext;
import org.elasticsearch.xpack.watcher.support.Variables;

import java.io.IOException;
import java.util.Map;

/**
* This class executes a script against the ctx payload and returns a boolean
Expand Down Expand Up @@ -58,10 +56,6 @@ public Result execute(WatchExecutionContext ctx) {
}

public Result doExecute(WatchExecutionContext ctx) {
Map<String, Object> parameters = Variables.createCtxParamsMap(ctx, ctx.payload());
if (script.getParams() != null && !script.getParams().isEmpty()) {
parameters.putAll(script.getParams());
}
WatcherConditionScript conditionScript = scriptFactory.newInstance(script.getParams(), ctx);
return conditionScript.execute() ? MET : UNMET;
}
Expand Down

0 comments on commit c6e19f4

Please sign in to comment.