You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/09/29 16:20:00 UTC

[jira] [Commented] (OFBIZ-13623) Two missing null-guards cause NPEs instead of the clean no-op the original mini-lang produced

    [ https://issues.apache.org/jira/browse/OFBIZ-13623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18120811#comment-18120811 ] 

ASF subversion and git services commented on OFBIZ-13623:
---------------------------------------------------------

Commit c29e4aeb7612a82e02d6d7879afbb22c77281aa8 in ofbiz-framework's branch refs/heads/trunk from Mridul Pathak
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=c29e4aeb76 ]

Fixed: Two missing null-guards in CommunicationEventServicesScript.groovy (OFBIZ-13623)

- setCommunicationEventStatus() dot-accessed communicationEvent.statusId with no guard after queryOne(), throwing an NPE for a missing event instead of the clean no-op mini-lang produced. Direct sibling of the fix already applied to setCommunicationEventRoleStatus() (OFBIZ-13591).
- sendContactUsEmailToCompany(), a public unauthenticated Contact Us handler, dot-accessed productStoreEmailSetting.bodyScreenLocation with no guard; since productStoreId/emailType are optional, an unconfigured setting threw an NPE after the CommunicationEvent had already been created.


> Two missing null-guards cause NPEs instead of the clean no-op the original mini-lang produced
> ---------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-13623
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13623
>             Project: OFBiz
>          Issue Type: Bug
>          Components: party
>    Affects Versions: Upcoming Branch, 24.09.07
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Major
>
> *1. {{setCommunicationEventStatus()}}* dot-accesses {{communicationEvent.statusId}} with no null-guard after {{queryOne()}}. Direct sibling of a bug already fixed elsewhere in this file for {{setCommunicationEventRoleStatus()}} (OFBIZ-13591) — that fix never got applied here.
> *2. {{sendContactUsEmailToCompany()}}* dot-accesses {{productStoreEmailSetting.bodyScreenLocation}} with no guard; {{productStoreId}}/{{emailType}} are optional attributes, so a normal unconfigured setting throws an NPE on this public, unauthenticated "Contact Us" handler, after the {{CommunicationEvent}} has already been created.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)