3168 added some nullcheck (#3169)

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
This commit is contained in:
TipzCM 2021-11-15 15:30:41 -05:00 committed by GitHub
parent 1478abac3a
commit 5cefa7a6cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 5 deletions

View File

@ -23,6 +23,7 @@ package ca.uhn.fhir.rest.server.interceptor;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.interceptor.api.Interceptor; import ca.uhn.fhir.interceptor.api.Interceptor;
import ca.uhn.fhir.parser.IParser; import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.api.RestOperationTypeEnum;
import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
@ -310,11 +311,14 @@ public abstract class BaseValidatingInterceptor<T> extends ValidationResultEnric
return null; return null;
} }
switch (theRequestDetails.getRestOperationType()) { RestOperationTypeEnum opType = theRequestDetails.getRestOperationType();
case GRAPHQL_REQUEST: if (opType != null) {
return null; switch (opType) {
default: case GRAPHQL_REQUEST:
break; return null;
default:
break;
}
} }
FhirValidator validator; FhirValidator validator;