mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-4296 - removed redundant parent type checked
This commit is contained in:
@@ -155,16 +155,8 @@ public class FilePlanType extends BaseBehaviourBean
|
|||||||
@Override
|
@Override
|
||||||
public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew)
|
public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew)
|
||||||
{
|
{
|
||||||
// ensure we only add categories and special containers as fileplan children
|
// check the created child is of an accepted type
|
||||||
NodeRef child = childAssocRef.getChildRef();
|
validateNewChildAssociation(childAssocRef.getParentRef(), childAssocRef.getChildRef(), ACCEPTED_UNIQUE_CHILD_TYPES, ACCEPTED_NON_UNIQUE_CHILD_TYPES);
|
||||||
NodeRef parent = childAssocRef.getParentRef();
|
|
||||||
if (!getFilePlanService().isFilePlan(parent))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// list of the accepted types of fileplan children
|
|
||||||
validateNewChildAssociation(parent, child, ACCEPTED_UNIQUE_CHILD_TYPES, ACCEPTED_NON_UNIQUE_CHILD_TYPES);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -62,7 +62,6 @@ public class FilePlanTypeUnitTest extends BaseUnitTest
|
|||||||
public void setup()
|
public void setup()
|
||||||
{
|
{
|
||||||
filePlanContainer = generateNodeRef(TYPE_FILE_PLAN, true);
|
filePlanContainer = generateNodeRef(TYPE_FILE_PLAN, true);
|
||||||
when(mockedFilePlanService.isFilePlan(filePlanContainer)).thenReturn(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user