mirror of https://github.com/rusefi/rusefi.git
only: NPE check
This commit is contained in:
parent
c656271e7d
commit
38d0cecaaa
|
@ -83,6 +83,7 @@ public class LiveDataProcessor {
|
|||
public static ArrayList<LinkedHashMap> getStringObjectMap(Reader reader) {
|
||||
Yaml yaml = new Yaml();
|
||||
Map<String, Object> objectMap = yaml.load(reader);
|
||||
Objects.requireNonNull(objectMap, "content of " + reader);
|
||||
if (objectMap.size() != 1)
|
||||
throw new IllegalStateException("Exactly one top level key expected");
|
||||
String key = objectMap.keySet().iterator().next();
|
||||
|
|
Loading…
Reference in New Issue