Add NULL-safe check on the myValidationSupportChain as well as a setter method in case it needs to be injected. (#3190)

This commit is contained in:
Kevin Dougan SmileCDR 2021-11-25 07:59:35 -05:00 committed by GitHub
parent 41ef7cf961
commit 10cad65534
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -77,6 +77,10 @@ public class ValueSetOperationProvider extends BaseJpaProvider {
myTermReadSvc = theTermReadSvc;
}
public void setValidationSupportChain(ValidationSupportChain theValidationSupportChain) {
myValidationSupportChain = theValidationSupportChain;
}
@Operation(name = JpaConstants.OPERATION_EXPAND, idempotent = true, typeName = "ValueSet")
public IBaseResource expand(
HttpServletRequest theServletRequest,
@ -154,7 +158,7 @@ public class ValueSetOperationProvider extends BaseJpaProvider {
startRequest(theServletRequest);
try {
// If a Remote Terminology Server has been configured, use it
if (myValidationSupportChain.isRemoteTerminologyServiceConfigured()) {
if (myValidationSupportChain != null && myValidationSupportChain.isRemoteTerminologyServiceConfigured()) {
String theSystemString = (theSystem != null && theSystem.hasValue()) ? theSystem.getValueAsString() : null;
String theCodeString = (theCode != null && theCode.hasValue()) ? theCode.getValueAsString() : null;
String theDisplayString = (theDisplay != null && theDisplay.hasValue()) ? theDisplay.getValueAsString() : null;