Skip to content

Commit 3eff445

Browse files
Fix Empty YAML Content Nodes (#89)
Skip over empty content nodes when populating a YAML map.
1 parent 39f981d commit 3eff445

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

org/enigma/TargetHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,10 @@ private static void populateMap(Map<String,Set<String>> map, YamlNode node, Stri
415415
YamlNode n = ((YamlNode) e);
416416
for (YamlElement el : n.chronos)
417417
{
418+
String value = ((YamlContent) el).getValue();
419+
if (value == null) continue;
418420
Set<String> dep = new HashSet<String>();
419-
for (String s : SPLITTER.split(((YamlContent) el).getValue().toLowerCase()))
421+
for (String s : SPLITTER.split(value.toLowerCase()))
420422
if (!s.isEmpty()) dep.add(s);
421423
map.put(el.name,dep);
422424
}

0 commit comments

Comments
 (0)