diff --git a/src/main/java/org/computate/frFR/java/ConfigSite.java b/src/main/java/org/computate/frFR/java/ConfigSite.java index 632f344..9f80982 100644 --- a/src/main/java/org/computate/frFR/java/ConfigSite.java +++ b/src/main/java/org/computate/frFR/java/ConfigSite.java @@ -1010,14 +1010,22 @@ public String regex(String motif, String texte, String valeurDefaut) { public JsonObject regexYamlObject(String champ, String texte) { Yaml yaml = new Yaml(); - Map map = yaml.load(regexYamlString(champ, texte)); - return new JsonObject(map); + String str = regexYamlString(champ, texte); + if(str != null) { + Map map = yaml.load(str); + return new JsonObject(map); + } + return null; } public JsonArray regexYamlArray(String champ, String texte) { Yaml yaml = new Yaml(); - List map = yaml.load(regexYamlString(champ, texte)); - return new JsonArray(map); + String str = regexYamlString(champ, texte); + if(str != null) { + List list = yaml.load(str); + return new JsonArray(list); + } + return null; } public String regexYamlString(String champ, String texte) {