Further subdue exception that contains no useful information and is prevelant during auditing.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@97189 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2015-02-17 04:34:45 +00:00
parent 0987daf91e
commit d1ba1372a8

View File

@@ -460,24 +460,23 @@ public class FilePlanServiceImpl extends ServiceBaseImpl
*/ */
private void getNodeRefPathRecursive(NodeRef nodeRef, Deque<NodeRef> nodeRefPath) private void getNodeRefPathRecursive(NodeRef nodeRef, Deque<NodeRef> nodeRefPath)
{ {
if (!isFilePlanComponent(nodeRef)) if (isFilePlanComponent(nodeRef))
{ {
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_INVALID_RM_NODE, ASPECT_FILE_PLAN_COMPONENT.toString())); // Prepend it to the path
} nodeRefPath.addFirst(nodeRef);
// Prepend it to the path // Are we not at the root
nodeRefPath.addFirst(nodeRef); if (!isFilePlan(nodeRef))
// Are we not at the root
if (!isFilePlan(nodeRef) && isFilePlanComponent(nodeRef))
{
ChildAssociationRef assocRef = nodeService.getPrimaryParent(nodeRef);
if (assocRef == null)
{ {
// We hit the top of the store ChildAssociationRef assocRef = nodeService.getPrimaryParent(nodeRef);
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NO_ROOT)); if (assocRef == null)
{
// We hit the top of the store
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_NO_ROOT));
}
// Recurse
nodeRef = assocRef.getParentRef();
getNodeRefPathRecursive(nodeRef, nodeRefPath);
} }
// Recurse
nodeRef = assocRef.getParentRef();
getNodeRefPathRecursive(nodeRef, nodeRefPath);
} }
} }