forked from Archives/Athou_commafeed
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user