use ConfigurationUtils to read string value from config

This commit is contained in:
javanna 2015-11-12 15:38:36 +01:00 committed by Luca Cavanna
parent c12c9e6e29
commit 5bd4493ea2
1 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@
package org.elasticsearch.ingest;
import org.elasticsearch.ingest.processor.ConfigurationUtils;
import org.elasticsearch.ingest.processor.Processor;
import java.io.IOException;
@ -73,7 +74,7 @@ public final class Pipeline {
public final static class Factory {
public Pipeline create(String id, Map<String, Object> config, Map<String, Processor.Factory> processorRegistry) throws IOException {
String description = (String) config.get("description");
String description = ConfigurationUtils.readStringProperty(config, "description");
List<Processor> processors = new ArrayList<>();
@SuppressWarnings("unchecked")
List<Map<String, Map<String, Object>>> processorConfigs = (List<Map<String, Map<String, Object>>>) config.get("processors");