From b6abeef32752adbaca6bbcf1f0ac0278a76e4fe5 Mon Sep 17 00:00:00 2001 From: Mark Iantorno Date: Wed, 21 Apr 2021 11:26:53 -0400 Subject: [PATCH] Fix for https://github.com/hapifhir/hapi-fhir/issues/2540 (#481) woooooo --- .../validation/instance/type/StructureDefinitionValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java index 2bd710d9d..ae9d14212 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java @@ -156,7 +156,7 @@ public class StructureDefinitionValidator extends BaseValidator { // hint(errors, IssueType.BUSINESSRULE, stack.getLiteralPath(), !snapshot || bt == null, I18nConstants.SD_ED_SHOULD_BIND, element.getNamedChildValue("path"), bt); } // in a snapshot, we validate that fixedValue, pattern, and defaultValue, if present, are all of the right type - if (snapshot && element.getIdBase().contains(".")) { + if (snapshot && (element.getIdBase() != null) && (element.getIdBase().contains("."))) { if (rule(errors, IssueType.EXCEPTION, stack.getLiteralPath(), !typeCodes.isEmpty() || element.hasChild("contentReference"), I18nConstants.SD_NO_TYPES_OR_CONTENTREF, element.getIdBase())) { Element v = element.getNamedChild("defaultValue"); if (v != null) {