From da33791a2311d65ec88aaf790b57e6f2e14eb087 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Fri, 23 Aug 2024 21:51:25 +0800 Subject: [PATCH] fix NPE in ValueSetValidator --- .../hl7/fhir/validation/instance/type/ValueSetValidator.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/ValueSetValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/ValueSetValidator.java index 00477aceb..d71692825 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/ValueSetValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/ValueSetValidator.java @@ -277,7 +277,7 @@ public class ValueSetValidator extends BaseValidator { } if (version == null) { CodeSystem cs = context.fetchCodeSystem(system); - if (cs != null && !CodeSystemUtilities.isExemptFromMultipleVersionChecking(system)) { + if (cs != null && !CodeSystemUtilities.isExemptFromMultipleVersionChecking(system) && fetcher != null) { Set possibleVersions = fetcher.fetchCanonicalResourceVersions(null, valContext.getAppContext(), system); warning(errors, NO_RULE_DATE, IssueType.INVALID, stack, possibleVersions.size() <= 1, I18nConstants.TYPE_SPECIFIC_CHECKS_DT_CANONICAL_MULTIPLE_POSSIBLE_VERSIONS, system, cs.getVersion(), CommaSeparatedStringBuilder.join(", ", Utilities.sorted(possibleVersions)));