Merge pull request #411 from MageFroh/null-ptr-fix

Fix null ptr exception in feed/get/{id} rest call when all entries are read
This commit is contained in:
Athou
2013-07-09 21:12:58 -07:00

View File

@@ -308,6 +308,9 @@ public class FeedREST extends AbstractResourceREST {
return Response.status(Status.NOT_FOUND).build();
}
Long unreadCount = feedSubscriptionService.getUnreadCount(getUser()).get(id);
if (unreadCount == null) {
unreadCount = new Long(0);
}
return Response.ok(
Subscription.build(sub, applicationSettingsService.get()
.getPublicUrl(), unreadCount)).build();