mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fixed ALF-10061: NodeService.getAssoc() throws an exception if the requested association does not exist
- CMIS expects to get null (as per NodeService javadoc) but it was generating a concurrency exception - Added a specific call to getNodeAssocOrNull to the DAO git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30162 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,6 +29,7 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.MLText;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef.Status;
|
||||
@@ -375,4 +376,11 @@ public class NodeServiceTest extends TestCase
|
||||
txnIdRestore, archivedStatus.getDbTxnId());
|
||||
}
|
||||
}
|
||||
|
||||
public void testGetAssocById()
|
||||
{
|
||||
// Get a node association that doesn't exist
|
||||
AssociationRef assocRef = nodeService.getAssoc(Long.MAX_VALUE);
|
||||
assertNull("Should get null for missing ID of association. ", assocRef);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user