fix npe in test case

This commit is contained in:
Grahame Grieve 2024-09-25 13:03:39 -04:00
parent 213d8f25f8
commit fc5c54bcc2
1 changed files with 4 additions and 2 deletions

View File

@ -1303,7 +1303,9 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
// ok, first we try to validate locally
try {
ValueSetValidator vsc = constructValueSetCheckerSimple(options, vs, ctxt);
vsc.getOpContext().note("Validate "+code.toString()+" @ "+path+" against "+(vs == null ? "null" : vs.getVersionedUrl()));
if (vsc.getOpContext() != null) {
vsc.getOpContext().note("Validate "+code.toString()+" @ "+path+" against "+(vs == null ? "null" : vs.getVersionedUrl()));
}
vsc.setUnknownSystems(unknownSystems);
vsc.setThrowToServer(options.isUseServer() && terminologyClientManager.hasClient());
if (!ValueSetUtilities.isServerSide(code.getSystem())) {
@ -1329,7 +1331,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
issues.add(iss);
return new ValidationResult(IssueSeverity.FATAL, e.getMessage(), e.getError(), issues);
} catch (Exception e) {
// e.printStackTrace();
e.printStackTrace();
localError = e.getMessage();
}
}