Fixed review comment.

This commit is contained in:
Tuna Aksoy
2017-01-09 14:46:33 +00:00
parent abc1d120fd
commit 33bcab147b

View File

@@ -853,7 +853,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
ParameterCheck.mandatory("isLinked", isLinked); ParameterCheck.mandatory("isLinked", isLinked);
recordCreationSanityCheckOnNode(nodeRef); recordCreationSanityCheckOnNode(nodeRef);
recordCreationSanityCheckOnFilePlan(filePlan); final NodeRef checkedFilePlan = recordCreationSanityCheckOnFilePlan(filePlan);
// do the work of creating the record as the system user // do the work of creating the record as the system user
AuthenticationUtil.runAsSystem(new RunAsWork<Void>() AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
@@ -868,7 +868,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
try try
{ {
// get the new record container for the file plan // get the new record container for the file plan
NodeRef newRecordContainer = filePlanService.getUnfiledContainer(filePlan); NodeRef newRecordContainer = filePlanService.getUnfiledContainer(checkedFilePlan);
if (newRecordContainer == null) if (newRecordContainer == null)
{ {
throw new AlfrescoRuntimeException("Unable to create record, because new record container could not be found."); throw new AlfrescoRuntimeException("Unable to create record, because new record container could not be found.");