Removal of dead code in ScriptedMetricAggregationBuilder
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.
@@ -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) {
