Skip to content
Snippets Groups Projects
Commit 52e7257a authored by pkupczyk's avatar pkupczyk
Browse files

SSDM-2294 : V3 AS API - paging and sorting of search results - fix a bug in...

SSDM-2294 : V3 AS API - paging and sorting of search results - fix a bug in paging when it invoked for a Collection that wasn't a List or Set

SVN: 34513
parent 88540779
No related branches found
No related tags found
No related merge requests found
......@@ -109,13 +109,13 @@ public class SortAndPage
if (objects instanceof List)
{
paged = new ListView((List) objects, fo.getFrom(), fo.getCount());
paged = new ListView(objects, fo.getFrom(), fo.getCount());
} else if (objects instanceof Set)
{
paged = new SetView(objects, fo.getFrom(), fo.getCount());
} else if (objects instanceof Collection)
{
paged = new ListView((List) objects, fo.getFrom(), fo.getCount());
paged = new ListView(objects, fo.getFrom(), fo.getCount());
} else
{
throw new IllegalArgumentException("Unsupported collection: " + objects.getClass());
......
......@@ -30,10 +30,9 @@ public class ListView<T> extends AbstractCollectionView<T> implements List<T>
private static final long serialVersionUID = 1L;
public ListView(List<T> originalList, Integer from, Integer count)
public ListView(Collection<T> originalList, Integer from, Integer count)
{
super(originalList, from, count);
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment