From 850542b888e2ec24754720f023da9dc4bfc6328a Mon Sep 17 00:00:00 2001 From: dotasek Date: Wed, 9 Oct 2024 12:00:05 -0400 Subject: [PATCH] Fix nullpointer on hasChild("resource") --- .../java/org/hl7/fhir/igtools/renderers/HistoryGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/HistoryGenerator.java b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/HistoryGenerator.java index 1f046bb7..0bbd463e 100644 --- a/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/HistoryGenerator.java +++ b/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/renderers/HistoryGenerator.java @@ -163,7 +163,7 @@ public static boolean allEntriesAreHistoryProvenance(Element resource) throws Un } List entries = resource.getChildrenByName("entry"); for (Element be : entries) { - if (!"Provenance".equals(be.getNamedChild("resource").fhirType())) { + if (!be.hasChild("resource") || !"Provenance".equals(be.getNamedChild("resource").fhirType())) { return false; } }