mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (Cloud/4.3) to HEAD (Cloud/4.3)
57158: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 57008: Merged PATCHES/V4.2.0 (4.2.0) to V4.2-BUG-FIX (4.2.1) 56822: ALF-20361: Not possible to edit MS Office document via CIFS if it was edited via CIFS and then new version was uploaded - Corrected LockServiceImpl.getLockState so that it handles the case when a "non-lock" appears in the lock store following a rollback - Added check for existence of NodeRef in LockServiceImpl.getLockState before testing for the Lockable aspect git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@57194 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -823,10 +823,13 @@ public class LockServiceImpl implements LockService,
|
|||||||
// Check in-memory for ephemeral locks first.
|
// Check in-memory for ephemeral locks first.
|
||||||
LockState lockState = lockStore.get(nodeRef);
|
LockState lockState = lockStore.get(nodeRef);
|
||||||
|
|
||||||
if (lockState == null)
|
//ALF-20361: It is possible that a rollback has resulted in a "non-lock" lock state being added to
|
||||||
|
//the lock store. Because of that, we check both whether the retrieved lockState is null and, if it isn't,
|
||||||
|
//whether it represents a real lock
|
||||||
|
if (lockState == null || !lockState.isLockInfo())
|
||||||
{
|
{
|
||||||
// No in-memory state, so get from the DB.
|
// No in-memory state, so get from the DB.
|
||||||
if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCKABLE))
|
if (nodeService.exists(nodeRef) && nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCKABLE))
|
||||||
{
|
{
|
||||||
String lockOwner = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCK_OWNER);
|
String lockOwner = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_LOCK_OWNER);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user