mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
prevent NPE
This commit is contained in:
@@ -15,13 +15,17 @@ public class FeedEntryService {
|
||||
|
||||
public void markEntry(User user, Long entryId, boolean read) {
|
||||
FeedEntryStatus status = feedEntryStatusDAO.findById(user, entryId);
|
||||
status.setRead(read);
|
||||
feedEntryStatusDAO.update(status);
|
||||
if (status != null) {
|
||||
status.setRead(read);
|
||||
feedEntryStatusDAO.update(status);
|
||||
}
|
||||
}
|
||||
|
||||
public void starEntry(User user, Long entryId, boolean starred) {
|
||||
FeedEntryStatus status = feedEntryStatusDAO.findById(user, entryId);
|
||||
status.setStarred(starred);
|
||||
feedEntryStatusDAO.update(status);
|
||||
if (status != null) {
|
||||
status.setStarred(starred);
|
||||
feedEntryStatusDAO.update(status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user