Skip to content

Commit

Permalink
Fix Empty YAML Content Nodes (#89)
Browse files Browse the repository at this point in the history
Skip over empty content nodes when populating a YAML map.
  • Loading branch information
RobertBColton authored Aug 6, 2021
1 parent 39f981d commit 3eff445
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion org/enigma/TargetHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,10 @@ private static void populateMap(Map<String,Set<String>> map, YamlNode node, Stri
YamlNode n = ((YamlNode) e);
for (YamlElement el : n.chronos)
{
String value = ((YamlContent) el).getValue();
if (value == null) continue;
Set<String> dep = new HashSet<String>();
for (String s : SPLITTER.split(((YamlContent) el).getValue().toLowerCase()))
for (String s : SPLITTER.split(value.toLowerCase()))
if (!s.isEmpty()) dep.add(s);
map.put(el.name,dep);
}
Expand Down

0 comments on commit 3eff445

Please sign in to comment.