npe check for binary storage interceptor

This commit is contained in:
Ken Stevens 2019-10-21 10:59:25 -04:00 committed by James Agnew
parent 73961072a6
commit 0f40b2c48f
1 changed files with 3 additions and 0 deletions

View File

@ -169,6 +169,9 @@ public class BinaryStorageInterceptor {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Hook(Pointcut.STORAGE_PRECOMMIT_RESOURCE_CREATED) @Hook(Pointcut.STORAGE_PRECOMMIT_RESOURCE_CREATED)
public void storeLargeBinariesBeforeCreatePersistence(ServletRequestDetails theRequestDetails, IBaseResource theResource, Pointcut thePoincut) throws IOException { public void storeLargeBinariesBeforeCreatePersistence(ServletRequestDetails theRequestDetails, IBaseResource theResource, Pointcut thePoincut) throws IOException {
if (theRequestDetails == null) {
return;
}
List<DeferredBinaryTarget> deferredBinaryTargets = (List<DeferredBinaryTarget>) theRequestDetails.getUserData().get(getDeferredListKey()); List<DeferredBinaryTarget> deferredBinaryTargets = (List<DeferredBinaryTarget>) theRequestDetails.getUserData().get(getDeferredListKey());
if (deferredBinaryTargets != null) { if (deferredBinaryTargets != null) {
IIdType resourceId = theResource.getIdElement(); IIdType resourceId = theResource.getIdElement();