From 31f80f29f8291c84903a913bf14201caf522e1b4 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 4 Apr 2020 00:01:00 +1100 Subject: [PATCH] fix for NPE --- .../java/org/hl7/fhir/r5/conformance/ProfileUtilities.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java index 8671375f1..a977faefc 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java @@ -588,7 +588,9 @@ public class ProfileUtilities extends TranslatingUtilities { // hack around a problem in R4 definitions (somewhere?) for (ElementDefinition ed : derived.getSnapshot().getElement()) { for (ElementDefinitionMappingComponent mm : ed.getMapping()) { - mm.setMap(mm.getMap().trim()); + if (mm.hasMap()) { + mm.setMap(mm.getMap().trim()); + } } for (ElementDefinitionConstraintComponent s : ed.getConstraint()) { if (s.hasSource()) {