From bf00cc17b4dd1e4c941d99a9ac2c55b6d6439178 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 20 Sep 2023 11:14:10 +1000 Subject: [PATCH] Fix error in FML parser parsing parameters --- .../main/java/org/hl7/fhir/r5/elementmodel/JsonParser.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/JsonParser.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/JsonParser.java index dba168178..49e1900a7 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/JsonParser.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/JsonParser.java @@ -140,7 +140,9 @@ public class JsonParser extends ParserBase { obj = org.hl7.fhir.utilities.json.parser.JsonParser.parseObject(source, true, true); } - ctxt.setElement(parse(ctxt.getErrors(), obj)); + if (obj != null) { + ctxt.setElement(parse(ctxt.getErrors(), obj)); + } List res = new ArrayList<>(); res.add(ctxt); @@ -150,6 +152,9 @@ public class JsonParser extends ParserBase { } public Element parse(List errors, JsonObject object) throws FHIRException { + if (object == null) { + System.out.println("What?"); + } StructureDefinition sd = getLogical(); String name; String path;