From 842953eb1e64c5cd347c288acd612c55dcc78928 Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Mon, 21 Oct 2019 10:59:25 -0400 Subject: [PATCH] npe check for binary storage interceptor --- .../ca/uhn/fhir/jpa/binstore/BinaryStorageInterceptor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryStorageInterceptor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryStorageInterceptor.java index 1b5c912f8a0..f5e4e69cade 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryStorageInterceptor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/binstore/BinaryStorageInterceptor.java @@ -169,6 +169,9 @@ public class BinaryStorageInterceptor { @SuppressWarnings("unchecked") @Hook(Pointcut.STORAGE_PRECOMMIT_RESOURCE_CREATED) public void storeLargeBinariesBeforeCreatePersistence(ServletRequestDetails theRequestDetails, IBaseResource theResource, Pointcut thePoincut) throws IOException { + if (theRequestDetails == null) { + return; + } List deferredBinaryTargets = (List) theRequestDetails.getUserData().get(getDeferredListKey()); if (deferredBinaryTargets != null) { IIdType resourceId = theResource.getIdElement();