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/30 10:53:00 UTC

[jira] [Created] (OFBIZ-13629) Resolve component: locations with ComponentLocationResolver in CommonEvents.openSourceFile and make ComponentConfig.getComponentConfig(String) lookup-only

Mridul Pathak created OFBIZ-13629:
-------------------------------------

             Summary: Resolve component: locations with ComponentLocationResolver in CommonEvents.openSourceFile and make ComponentConfig.getComponentConfig(String) lookup-only
                 Key: OFBIZ-13629
                 URL: https://issues.apache.org/jira/browse/OFBIZ-13629
             Project: OFBiz
          Issue Type: Improvement
          Components: framework/base, framework/common
    Affects Versions: 24.09.07, Upcoming Branch
            Reporter: Mridul Pathak
            Assignee: Mridul Pathak


Related to CodeQL alerts 1810, 1543 and 1811. Two small changes are proposed to make the code say what it already does.

h3. 1. CommonEvents.openSourceFile

The method only accepts locations that start with {{component:}}, but resolves them through {{FlexibleLocation}}, which accepts every location type. Proposal: resolve them with {{ComponentLocationResolver}} directly.

h3. 2. ComponentConfig.getComponentConfig(String)

The single-argument overload delegates to the two-argument one with a null root location, which can only return a cached config or throw. Proposal: make it an explicit lookup-only method and use it in {{getFullLocation}}. The existing TODO on this method suggests lazy loading of components by name; that does not seem needed, since all components are loaded at startup, so the comment would be removed. The intent is no change in behavior.

h3. Release branch

release24.09 has the same code and the same alerts. A backport is planned once the change on trunk shows the alerts clearing.



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