Merged V3.3-BUG-FIX to HEAD

23054: Merged BRANCHES/DEV/BELARUS/V3.3-BUG-FIX-2010_10_04 to BRANCHES/DEV/V3.3-BUG-FIX:
      23044: ALF-5112 : Bug fix for ALF-3962 is incomplete (can cause fix-up of version history to be incorrectly ordered - in case where versions have the same frozen modified date)
      - merged with some updates, eg. force unit test to exercise the fix
   23058: ALF-4379: Don't mix up email recipients for different actions


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23059 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2010-10-12 17:07:14 +00:00
parent 3c9c19ec74
commit 568086c76c
2 changed files with 55 additions and 6 deletions

View File

@@ -959,7 +959,22 @@ public class Version2ServiceImpl extends VersionServiceImpl implements VersionSe
int result = v1.getFrozenModifiedDate().compareTo(v2.getFrozenModifiedDate());
if (result == 0)
{
result = v1.getFrozenStateNodeRef().getId().compareTo(v2.getFrozenStateNodeRef().getId());
Long dbid1 = (Long)nodeService.getProperty(v1.getFrozenStateNodeRef(), ContentModel.PROP_NODE_DBID);
Long dbid2 = (Long)nodeService.getProperty(v2.getFrozenStateNodeRef(), ContentModel.PROP_NODE_DBID);
if (dbid1 != null && dbid2 != null)
{
result = dbid1.compareTo(dbid2);
}
else
{
result = 0;
if (logger.isWarnEnabled())
{
logger.warn("node-dbid property is missing for versions: " + v1.toString() + " or " + v2.toString());
}
}
}
return result;
}