You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/09/16 07:22:00 UTC
[jira] [Closed] (OFBIZ-13591) setCommEventRoleToRead and setCommunicationEventRoleStatus NPE when no role exists
[ https://issues.apache.org/jira/browse/OFBIZ-13591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mridul Pathak closed OFBIZ-13591.
---------------------------------
Fix Version/s: Upcoming Branch
24.09.08
Resolution: Fixed
> setCommEventRoleToRead and setCommunicationEventRoleStatus NPE when no role exists
> ----------------------------------------------------------------------------------
>
> Key: OFBIZ-13591
> URL: https://issues.apache.org/jira/browse/OFBIZ-13591
> Project: OFBiz
> Issue Type: Bug
> Components: party
> Affects Versions: Upcoming Branch, 24.09.07
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Major
> Fix For: Upcoming Branch, 24.09.08
>
>
> Both methods look up a {{CommunicationEventRole}} that can legitimately be absent (no matching role for the given party/event), then unconditionally dereference the result:
> {code:groovy}
> eventRole = from('CommunicationEventRole').where(...).queryFirst()
> parameters.roleTypeId = eventRole.roleTypeId // NPE if eventRole is null
> {code}
> The original minilang's field access is null-safe, so a missing role was silently a no-op. Both services are auth-callable and reachable whenever a caller checks status/marks-read for a party that isn't a role participant on the event.
> Needs fixing: null-guard {{eventRole}}/{{communicationEventRole}} in both methods before dereferencing, matching the original's graceful no-op.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)