ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aditya Sharma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-7112) EntityUtilProperties
Date Tue, 03 Apr 2018 10:23:00 GMT

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

Aditya Sharma commented on OFBIZ-7112:

Thanks Jacques for the description. I am aware of the efforts here & we are on the same
page. The patch I provided only removes some redundant code without affecting the current
logic. My bad I should be more descriptive.
{quote}Map<String, String> results = new HashMap<>();
results.put("isExistInDb", "N");
results.put("value", "");
results map is already initialised in the beginning with isExistInDb as "N" and value as "".

and these values only changed when systemProperty != null. So except for this condition if we
return results at any point it will have isExistInDb as "N" and value as "". If we remove
the lines I removed in the patch, it will only remove put operations that are not necessary.

> EntityUtilProperties
> --------------------
>                 Key: OFBIZ-7112
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7112
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Wai
>            Assignee: Jacques Le Roux
>            Priority: Major
>             Fix For: 17.12.01
>         Attachments: OFBIZ-7112.patch, OFBIZ-7112.patch, OFBIZ-7112.patch, OFBIZ-7112.patch,
> Ofbiz reads properties from either a properties file or the entity:SystemProperty. The
way it works previously is that ofbiz reads from the entity:SystemProperty first and if there
is no value associated with the target propertyname, it would then locate the value from the
relevant properties file.
> In other words, if there is a database entry for a property, the database entry should
override the associated properties file.
> The issue is that if a database entry exist but the value is empty, it would look for
a value from the properties file.  It should not do so.  If a database entry exists for the
propertyname of interest, the value should be taken from the database even if it holds an
empty value.

This message was sent by Atlassian JIRA

View raw message