From 3eff44553c05049988f5b3cb2625ccf51fec54c8 Mon Sep 17 00:00:00 2001 From: Robert Colton Date: Thu, 5 Aug 2021 21:11:26 -0400 Subject: [PATCH] Fix Empty YAML Content Nodes (#89) Skip over empty content nodes when populating a YAML map. --- org/enigma/TargetHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org/enigma/TargetHandler.java b/org/enigma/TargetHandler.java index 78abfcf..92f312f 100644 --- a/org/enigma/TargetHandler.java +++ b/org/enigma/TargetHandler.java @@ -415,8 +415,10 @@ private static void populateMap(Map> map, YamlNode node, Stri YamlNode n = ((YamlNode) e); for (YamlElement el : n.chronos) { + String value = ((YamlContent) el).getValue(); + if (value == null) continue; Set dep = new HashSet(); - 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); }