Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)

124146 amorarasu: Merged 5.0.N (5.0.4) to 5.1.N (5.1.2)
      124109 amorarasu: Merged V4.2-BUG-FIX (4.2.7) to 5.0.N (5.0.4)
         124108 amorarasu: MNT-15801 : onContentUpdate policies not working for updates via webdav
            - Fixed code merged from 4.1.N, a different LockInfo method is used.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@124229 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-03-18 12:50:57 +00:00
parent 0fd5997ed2
commit 57c39e6ab1

View File

@@ -249,7 +249,7 @@ public class PutMethod extends WebDAVMethod implements ActivityPostProducer
// Note, for MNT-15801, that the aspect is only applied if:
// - the node is locked AND
// - the node does not have any content (zero length binaries included)
if (nodeLockInfo != null && nodeLockInfo.getToken() != null && !(ContentData.hasContent(contentData) && contentData.getSize() > 0))
if (nodeLockInfo != null && nodeLockInfo.isExclusive() && !(ContentData.hasContent(contentData) && contentData.getSize() > 0))
{
getNodeService().addAspect(contentNodeInfo.getNodeRef(), ContentModel.ASPECT_NO_CONTENT, null);
}