fix NPE in validator for SIDs

This commit is contained in:
Grahame Grieve 2024-03-20 21:00:16 +11:00
parent 95cd30d100
commit 1ecbf365be
1 changed files with 19 additions and 15 deletions

View File

@ -5761,6 +5761,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
}
if (rule(errors, "2023-09-15", IssueType.BUSINESSRULE, element.line(), element.col(), stack.getLiteralPath(), wg != null || url.contains("http://hl7.org/fhir/sid"), I18nConstants.VALIDATION_HL7_WG_NEEDED, ToolingExtensions.EXT_WORKGROUP)) {
if (wg != null) {
HL7WorkGroup wgd = HL7WorkGroups.find(wg);
if (rule(errors, "2023-09-15", IssueType.BUSINESSRULE, element.line(), element.col(), stack.getLiteralPath(), wgd != null, I18nConstants.VALIDATION_HL7_WG_UNKNOWN, wg)) {
String rpub = "HL7 International / "+wgd.getName();
@ -5777,6 +5778,9 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
Utilities.startsWithInList( wgd.getLink(), urls), I18nConstants.VALIDATION_HL7_WG_URL, wg, wgd.getLink());
return true;
}
} else {
return true; // HL7 sid.
}
}
return false;