Merged BRANCHES/DEV/V4.0-BUG-FIX to HEAD:

35751: Addendum to fix for ALF-11923. Fixing failing test case by tightening up delete behaviour.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@35753 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2012-04-26 09:27:53 +00:00
parent 25d5daf40b
commit 14bb26158d
2 changed files with 6 additions and 3 deletions

View File

@@ -261,7 +261,7 @@ public class RuleLinkTest extends BaseSpringTest
/** /**
* ALF-11923 * ALF-11923
* @since Odin * @since 4.0.2
* @author Neil Mc Erlean. * @author Neil Mc Erlean.
*/ */
public void testDeleteFolderWithRulesLinkedTo() public void testDeleteFolderWithRulesLinkedTo()

View File

@@ -132,7 +132,7 @@ public class RulesAspect implements
} }
/** /**
* @since Odin * @since 4.0.2
* @author Neil Mc Erlean * @author Neil Mc Erlean
*/ */
@Override public void beforeDeleteNode(NodeRef nodeRef) @Override public void beforeDeleteNode(NodeRef nodeRef)
@@ -158,7 +158,10 @@ public class RulesAspect implements
// Remove the aspect that marks the other folder has having rules (linked ones) // Remove the aspect that marks the other folder has having rules (linked ones)
nodeService.removeAspect(linkedFolder.getParentRef(), RuleModel.ASPECT_RULES); nodeService.removeAspect(linkedFolder.getParentRef(), RuleModel.ASPECT_RULES);
// And remove the child-assoc to the rules folder. // And remove the child-assoc to the rules folder.
nodeService.removeSecondaryChildAssociation(linkedFolder); if (nodeService.exists(linkedFolder.getChildRef()))
{
nodeService.removeSecondaryChildAssociation(linkedFolder);
}
} }
} }
} }