From 77307af57f65d9a02494ff3ab90eccadfcda65b8 Mon Sep 17 00:00:00 2001 From: Sam Ottenhoff Date: Fri, 2 Sep 2022 13:00:52 -0400 Subject: [PATCH] SAK-47763 NPE protection on startsWith (#10842) --- .../impl/ConversationsEntityContentProducerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conversations/impl/src/main/java/org/sakaiproject/conversations/impl/ConversationsEntityContentProducerImpl.java b/conversations/impl/src/main/java/org/sakaiproject/conversations/impl/ConversationsEntityContentProducerImpl.java index 7bb7418d4d64..4d8328a4000d 100644 --- a/conversations/impl/src/main/java/org/sakaiproject/conversations/impl/ConversationsEntityContentProducerImpl.java +++ b/conversations/impl/src/main/java/org/sakaiproject/conversations/impl/ConversationsEntityContentProducerImpl.java @@ -105,7 +105,7 @@ public boolean matches(String reference) { log.debug("matches({})", reference); - return reference.startsWith(ConversationsService.REFERENCE_ROOT); + return reference != null && reference.startsWith(ConversationsService.REFERENCE_ROOT); } public boolean matches(Event event) {