returned number of feeds on user statistics action fixed
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@130997 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9553b66e99
commit
50336ecee6
|
@ -1196,7 +1196,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
|
||||||
|
|
||||||
// sort the list, retrieve elements in the range and enhance the feeds
|
// sort the list, retrieve elements in the range and enhance the feeds
|
||||||
Collections.sort(feeds, Collections.reverseOrder());
|
Collections.sort(feeds, Collections.reverseOrder());
|
||||||
int upperIndex = (from + quantity) >= feeds.size() ? feeds.size() - 1 : from + quantity;
|
int upperIndex = (from + quantity) >= feeds.size() ? feeds.size() : from + quantity;
|
||||||
feeds = new ArrayList<Feed>(feeds.subList(from, upperIndex));
|
feeds = new ArrayList<Feed>(feeds.subList(from, upperIndex));
|
||||||
return enhanceFeeds(feeds, -1);
|
return enhanceFeeds(feeds, -1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue