Fixed critical issue reported by sonar (Dodgy - Redundant nullcheck of value known to be non-null)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@63494 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-03-02 16:32:30 +00:00
parent 43a2f10ef6
commit 6df1a7bca4

View File

@@ -216,11 +216,8 @@ public class RecordComponentIdentifierAspect extends BaseBehaviourBean
}
else if (afterId == null)
{
if (beforeId != null)
{
// The before value was not null, so remove it
attributeService.removeAttribute(CONTEXT_VALUE, contextNodeRef, beforeId);
}
// The before value was not null, so remove it
attributeService.removeAttribute(CONTEXT_VALUE, contextNodeRef, beforeId);
// Do a blanket removal in case this is a contextual nodes
attributeService.removeAttributes(CONTEXT_VALUE, nodeRef);
}