mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.1) to HEAD (5.2)
129164 mmuller: Merged RETURN-OF-THE-API (5.2.0) to 5.2.N (5.2.1) 128487 jvonka: V1 REST API: Node Version History - add basic paging - follow-on fix for NPE REPO-313 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@129338 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -53,6 +53,7 @@ import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -208,6 +209,11 @@ public class AbstractNodeRelation implements InitializingBean
|
||||
int pageEnd = skipCount + pageSize;
|
||||
|
||||
final List page = new ArrayList<>(pageSize);
|
||||
if (result == null)
|
||||
{
|
||||
result = Collections.emptyList();
|
||||
}
|
||||
|
||||
Iterator it = result.iterator();
|
||||
for (int counter = 0; counter < pageEnd && it.hasNext(); counter++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user