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 16:41:00 UTC
[jira] [Closed] (OFBIZ-13597) saveExtFileDataResource can NPE on a stale dataResourceId
[ https://issues.apache.org/jira/browse/OFBIZ-13597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mridul Pathak closed OFBIZ-13597.
---------------------------------
Fix Version/s: Upcoming Branch
24.09.08
Resolution: Fixed
> saveExtFileDataResource can NPE on a stale dataResourceId
> ---------------------------------------------------------
>
> Key: OFBIZ-13597
> URL: https://issues.apache.org/jira/browse/OFBIZ-13597
> Project: OFBiz
> Issue Type: Bug
> Components: content
> Affects Versions: Upcoming Branch, 24.09.07
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Minor
> Fix For: Upcoming Branch, 24.09.08
>
>
> {{saveExtFileDataResource}} receives an {{isUpdate}} flag determined by checking a different, related entity (e.g. {{ImageDataResource}}), decoupled from whether the base {{DataResource}} row actually exists. If {{dataResource}} isn't found (a stale/orphaned {{dataResourceId}}) while {{isUpdate}} is true and no upload filename was supplied, {{result.dataResourceId = dataResource.dataResourceId}} dereferences a null value and throws {{NullPointerException}}, where the original minilang's dotted access on an absent value was tolerant.
> Needs fixing: null-guard {{dataResource}} before dereferencing, or return an error if it's not found while {{isUpdate}} is true.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)