mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for ACE-3284 CMIS: NPE when performing concurrent search and delete operations
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@89211 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -194,11 +194,11 @@ public class DBResultSet extends AbstractResultSet
|
|||||||
int bulkFetchSize = getBulkFetchSize();
|
int bulkFetchSize = getBulkFetchSize();
|
||||||
if(bulkFetchSize < 1)
|
if(bulkFetchSize < 1)
|
||||||
{
|
{
|
||||||
nodeRefs[n] = tenantService.getBaseName(nodeDao.getNodePair(dbids.get(n)).getSecond());
|
NodeRef nodeRef = nodeDao.getNodePair(dbids.get(n)).getSecond();
|
||||||
|
nodeRefs[n] = nodeRef == null ? null : tenantService.getBaseName(nodeRef);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
List<Long> fetchList = new ArrayList<Long>(bulkFetchSize);
|
List<Long> fetchList = new ArrayList<Long>(bulkFetchSize);
|
||||||
BitSet done = new BitSet(bulkFetchSize);
|
BitSet done = new BitSet(bulkFetchSize);
|
||||||
int totalHits = dbids.size();
|
int totalHits = dbids.size();
|
||||||
@@ -227,7 +227,8 @@ public class DBResultSet extends AbstractResultSet
|
|||||||
nodeDao.cacheNodesById(fetchList);
|
nodeDao.cacheNodesById(fetchList);
|
||||||
for (int i = done.nextSetBit(0); i >= 0; i = done.nextSetBit(i+1))
|
for (int i = done.nextSetBit(0); i >= 0; i = done.nextSetBit(i+1))
|
||||||
{
|
{
|
||||||
nodeRefs[n+i] = tenantService.getBaseName(nodeDao.getNodePair(fetchList.get(i)).getSecond());
|
NodeRef nodeRef = nodeDao.getNodePair(fetchList.get(i)).getSecond();
|
||||||
|
nodeRefs[n+1] = nodeRef == null ? null : tenantService.getBaseName(nodeRef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -646,6 +646,11 @@ public class ACLEntryAfterInvocationProvider implements AfterInvocationProvider,
|
|||||||
|
|
||||||
NodeRef nodeRef = returnedObject.getNodeRef(i);
|
NodeRef nodeRef = returnedObject.getNodeRef(i);
|
||||||
|
|
||||||
|
if(filteringResultSet.getIncluded(i) && (nodeRef == null))
|
||||||
|
{
|
||||||
|
filteringResultSet.setIncluded(i, false);
|
||||||
|
}
|
||||||
|
|
||||||
if (filteringResultSet.getIncluded(i) && permissionService.hasReadPermission(nodeRef) == AccessStatus.DENIED)
|
if (filteringResultSet.getIncluded(i) && permissionService.hasReadPermission(nodeRef) == AccessStatus.DENIED)
|
||||||
{
|
{
|
||||||
filteringResultSet.setIncluded(i, false);
|
filteringResultSet.setIncluded(i, false);
|
||||||
|
Reference in New Issue
Block a user