minor fix

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@130996 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-08-06 19:57:54 +00:00
parent 087a1cd877
commit 9553b66e99
1 changed files with 2 additions and 2 deletions

View File

@ -1146,7 +1146,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
Calendar oneYearAgo = Calendar.getInstance();
oneYearAgo.set(Calendar.YEAR, oneYearAgo.get(Calendar.YEAR) - 1);
List<Feed> feeds = null;
ArrayList<Feed> feeds = null;
switch(action){
case POSTS_MADE_BY_USER:
@ -1198,7 +1198,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
Collections.sort(feeds, Collections.reverseOrder());
int upperIndex = (from + quantity) >= feeds.size() ? feeds.size() - 1 : from + quantity;
feeds = new ArrayList<Feed>(feeds.subList(from, upperIndex));
return enhanceFeeds((ArrayList<Feed>) feeds, -1);
return enhanceFeeds(feeds, -1);
}catch(Exception e){
_log.error("Error while retrieving feeds for user " + userid + " and action " + action.toString(), e);