REPO-1682 / MNT-15447: getCurrentVersion(node) throws ConcurrencyFailureException after creating multiple versions of a node

- Throw IllegalArgumentException when not a 'live' noderef is used for retrieving the current version.
   - Added Junit test.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@133884 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-12-19 12:05:24 +00:00
parent 9c99f44e0e
commit 9794eb72dc
3 changed files with 50 additions and 14 deletions

View File

@@ -169,11 +169,10 @@ public interface VersionService
throws AspectMissingException;
/**
* Gets the version object for the current version of the node reference
* passed.
* Gets the version object for the current version of the node reference passed.
* <p>
* Returns null if the node is not versionable or has not been versioned.
* @param nodeRef the node reference
* @param nodeRef the node reference of the 'live' node
* @return the version object for the current version
*/
@Auditable(parameters = {"nodeRef"})