mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-09 14:31:17 +00:00
fix npe validating code system
This commit is contained in:
parent
1087016941
commit
ae250c4053
@ -296,6 +296,9 @@ public class ValueSetValidator extends BaseValidator {
|
||||
cs = context.findTxResource(CodeSystem.class, system, version);
|
||||
}
|
||||
if (cs != null) { // if it's null, we can't analyse this
|
||||
if (cs.getContent() == null) {
|
||||
warning(errors, "2024-03-06", IssueType.INVALID, stack, false, version == null ? I18nConstants.VALUESET_INCLUDE_CS_CONTENT : I18nConstants.VALUESET_INCLUDE_CSVER_CONTENT, system, "null", version);
|
||||
} else {
|
||||
switch (cs.getContent()) {
|
||||
case EXAMPLE:
|
||||
warning(errors, "2024-03-06", IssueType.INVALID, stack, false, version == null ? I18nConstants.VALUESET_INCLUDE_CS_CONTENT : I18nConstants.VALUESET_INCLUDE_CSVER_CONTENT, system, cs.getContent().toCode(), version);
|
||||
@ -310,6 +313,7 @@ public class ValueSetValidator extends BaseValidator {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boolean systemOk = true;
|
||||
int cc = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user