Removal of dead code in ScriptedMetricAggregationBuilder (#24346)
This code removes a few lines of dead code from ScriptedMetricAggregationBuilder. Just completely dead code, it adds things to a Set that is then not used in any way.
This commit is contained in:
parent
4c0eb35c22
commit
3187ed73fc
|
@ -37,10 +37,8 @@ import org.elasticsearch.search.aggregations.AggregatorFactory;
|
|||
import org.elasticsearch.search.internal.SearchContext;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class ScriptedMetricAggregationBuilder extends AbstractAggregationBuilder<ScriptedMetricAggregationBuilder> {
|
||||
|
@ -239,11 +237,6 @@ public class ScriptedMetricAggregationBuilder extends AbstractAggregationBuilder
|
|||
Map<String, Object> params = null;
|
||||
XContentParser.Token token;
|
||||
String currentFieldName = null;
|
||||
Set<String> scriptParameters = new HashSet<>();
|
||||
scriptParameters.add(INIT_SCRIPT_FIELD.getPreferredName());
|
||||
scriptParameters.add(MAP_SCRIPT_FIELD.getPreferredName());
|
||||
scriptParameters.add(COMBINE_SCRIPT_FIELD.getPreferredName());
|
||||
scriptParameters.add(REDUCE_SCRIPT_FIELD.getPreferredName());
|
||||
|
||||
XContentParser parser = context.parser();
|
||||
while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
|
||||
|
|
Loading…
Reference in New Issue