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:
Costantino Perciante 2016-08-06 20:38:33 +00:00
parent 9553b66e99
commit 50336ecee6
1 changed files with 1 additions and 1 deletions

View File

@ -1196,7 +1196,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
// sort the list, retrieve elements in the range and enhance the feeds
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));
return enhanceFeeds(feeds, -1);