code review comments

This commit is contained in:
cagache
2019-08-01 16:02:55 +03:00
parent 78e49e77f1
commit f62235bd01
3 changed files with 71 additions and 29 deletions

View File

@@ -303,7 +303,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
if (!includedInHold)
{
// invert list to get list of holds that do not contain this node
NodeRef filePlan = isFilePlanComponent(nodeRef) ? filePlanService.getFilePlan(nodeRef) : filePlanService.getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID);
NodeRef filePlan = filePlanService.getFilePlanBySiteId(FilePlanService.DEFAULT_RM_SITE_ID);
List<NodeRef> allHolds = getHolds(filePlan);
result = ListUtils.subtract(allHolds, new ArrayList<>(holdsNotIncludingNodeRef));
}

View File

@@ -164,7 +164,7 @@ public class FrozenAspect extends BaseBehaviourBean
{
if (nodeService.exists(nodeRef) && (isRecord(nodeRef) || instanceOf(nodeRef, TYPE_CONTENT)))
{
// get the owning nodeRef folder
// get the owning folder
NodeRef parentRef = nodeService.getPrimaryParent(nodeRef).getParentRef();
// check that the aspect has been added
if (nodeService.hasAspect(parentRef, ASPECT_HELD_CHILDREN))