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 ...@@ -109,13 +109,13 @@ public class SortAndPage
if (objects instanceof List) 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) } else if (objects instanceof Set)
{ {
paged = new SetView(objects, fo.getFrom(), fo.getCount()); paged = new SetView(objects, fo.getFrom(), fo.getCount());
} else if (objects instanceof Collection) } else if (objects instanceof Collection)
{ {
paged = new ListView((List) objects, fo.getFrom(), fo.getCount()); paged = new ListView(objects, fo.getFrom(), fo.getCount());
} else } else
{ {
throw new IllegalArgumentException("Unsupported collection: " + objects.getClass()); throw new IllegalArgumentException("Unsupported collection: " + objects.getClass());
......
...@@ -30,10 +30,9 @@ public class ListView<T> extends AbstractCollectionView<T> implements List<T> ...@@ -30,10 +30,9 @@ public class ListView<T> extends AbstractCollectionView<T> implements List<T>
private static final long serialVersionUID = 1L; 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); super(originalList, from, count);
} }
@Override @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