fix NPE in ValueSetValidator

This commit is contained in:
Grahame Grieve 2024-08-23 21:51:25 +08:00
parent 96090efdf4
commit da33791a23
1 changed files with 1 additions and 1 deletions

View File

@ -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<String> 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)));