From 0624771ea669becb17a6becce15b12553252f76d Mon Sep 17 00:00:00 2001 From: austin48 Date: Wed, 18 Oct 2023 03:58:58 -1000 Subject: [PATCH] SAK-49341 Announcement NPE while viewing dashboard when announcements are merged from a site the user isn't a member of (#11970) Co-authored-by: Earle Nietzel (cherry picked from commit 380c361ee86c3781a5ead4fd489949fb32a0668e) --- .../sakaiproject/announcement/impl/DbAnnouncementService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/announcement/announcement-impl/impl/src/java/org/sakaiproject/announcement/impl/DbAnnouncementService.java b/announcement/announcement-impl/impl/src/java/org/sakaiproject/announcement/impl/DbAnnouncementService.java index 01df38ef092b..173253000bcd 100644 --- a/announcement/announcement-impl/impl/src/java/org/sakaiproject/announcement/impl/DbAnnouncementService.java +++ b/announcement/announcement-impl/impl/src/java/org/sakaiproject/announcement/impl/DbAnnouncementService.java @@ -29,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Stack; +import java.util.Collections; import lombok.Setter; import lombok.extern.slf4j.Slf4j; @@ -643,6 +644,6 @@ public List getViewableAnnouncementsForSite(String channelR } catch (Exception e) { log.warn("Failed to add announcements from site {}", channelRef, e); } - return null; + return Collections.emptyList(); } }