Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

94147: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud)
      94085: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.1)
         94037: Merged DEV to V4.2-BUG-FIX (4.2.5)
            94032 : MNT-13118 : VersionService randomly returns unexpected results
               - Throw ConcurrencyFailureException if there is version inconsistency


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95048 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 15:33:17 +00:00
parent 68e217aa0b
commit c98ab72301

View File

@@ -57,6 +57,7 @@ import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.util.Pair;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.extensions.surf.util.ParameterCheck;
/**
@@ -853,10 +854,7 @@ public class Version2ServiceImpl extends VersionServiceImpl implements VersionSe
if (! headVersion)
{
if (logger.isDebugEnabled())
{
logger.debug("Unexpected: current version does not appear to be 1st version in the list ["+versionHistoryRef+", "+nodeRef+"]");
}
throw new ConcurrencyFailureException("Unexpected: current version does not appear to be 1st version in the list ["+versionHistoryRef+", "+nodeRef+"]");
}
result = new Pair<Boolean, Version>(headVersion, getVersion(versionAssoc.getChildRef()));