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/10/28 16:23:00 UTC

[jira] [Closed] (OFBIZ-13765) Grid or form extending a missing parent in the same file fails with a NullPointerException

     [ https://issues.apache.org/jira/browse/OFBIZ-13765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Pathak closed OFBIZ-13765.
---------------------------------
    Fix Version/s: Upcoming Branch
                   24.09.09
       Resolution: Fixed

> Grid or form extending a missing parent in the same file fails with a NullPointerException
> ------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-13765
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13765
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework/widget
>    Affects Versions: Upcoming Branch, 24.09.08
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Minor
>             Fix For: Upcoming Branch, 24.09.09
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> ModelGrid.getParentModel and ModelSingleForm.getParentModel fall back to looking for a parent of the other widget type in the same file with {{findFirst().orElseGet(null)}}. When {{extends}} names something that is neither a grid nor a form in that file, {{orElseGet}} calls the null supplier and throws a NullPointerException, so the widget fails to load instead of logging "Failed to find parent ... definition" and continuing without a parent.
> h3. Proposed fix
> Use {{orElse(null)}} in both methods.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)