mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
[MNT-23666] Added fix to delete the link after document deletion (#2045)
* [MNT-23666] Added fix to delete the link after document deletion
* Resolved PMD scan warnings
* Revert "Resolved PMD scan warnings"
This reverts commit 5e0ea61a56
.
This commit is contained in:
@@ -368,7 +368,10 @@ public class DocumentLinkServiceImpl implements DocumentLinkService, NodeService
|
|||||||
public void beforeDeleteLinkNode(NodeRef linkNodeRef)
|
public void beforeDeleteLinkNode(NodeRef linkNodeRef)
|
||||||
{
|
{
|
||||||
final NodeRef nodeRef = getLinkDestination(linkNodeRef);
|
final NodeRef nodeRef = getLinkDestination(linkNodeRef);
|
||||||
|
if (nodeRef == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
List<Long> nodeRefLinks = getNodeLinksIds(nodeRef);
|
List<Long> nodeRefLinks = getNodeLinksIds(nodeRef);
|
||||||
|
|
||||||
long linkNodeId = (Long) nodeService.getProperty(linkNodeRef, ContentModel.PROP_NODE_DBID);
|
long linkNodeId = (Long) nodeService.getProperty(linkNodeRef, ContentModel.PROP_NODE_DBID);
|
||||||
|
Reference in New Issue
Block a user