PY-31647: support "MIDDLEWARE" in settings

Since 1.10 we use MIDDLEWARE instead of MIDDLEWARE_CLASSES
This commit is contained in:
Ilya.Kazakevich
2018-11-09 01:33:56 +03:00
parent 5740f632e6
commit 424205b72b
@@ -28,6 +28,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author yole
@@ -133,6 +134,11 @@ public class PyBlockEvaluator {
return value instanceof List ? (List)value : null;
}
@NotNull
public List<String> getValueAsStringList(@NotNull final String[] name) {
return Arrays.stream(name).flatMap(o -> getValueAsStringList(o).stream()).collect(Collectors.toList());
}
@NotNull
public List<String> getValueAsStringList(String name) {
Object value = myEvaluationResult.myNamespace.get(name);