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

Pierre Smits commented on OFBIZ-5458:
-------------------------------------

Argh....

public static String getPropertyValue(String resource, String name, String 
defaultValue, Delegator delegator) {
        String value = getSystemPropertyValue(resource, name, delegator);
        if (UtilValidate.isEmpty(value)) {
            value = UtilProperties.getPropertyValue(resource, name, 
defaultValue);
        }
        return value;
    }
in EntityUtilProperties.java requires that there is a defaultValue, which 
actually defeats the intended objective (of not have hardcoded values) . Just 
see example (in accounting/finaccount/FinAccountPaymentServices.java) below.

currencyUom = EntityUtilProperties.getPropertyValue("general.properties", 
"currency.uom.id.default", "USD", delegator);

And actually it is superfluous, as the 'value = 
UtilProperties.getPropertyValue(resource, name, defaultValue);'  always gets 
the value from the .properties file.

Or am I mistaken?


> getSystemPropertyValue is never called/used
> -------------------------------------------
>
>                 Key: OFBIZ-5458
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5458
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL APPLICATIONS, ALL COMPONENTS, framework
>         Environment: multi-tenant multi-server
>            Reporter: Pierre Smits
>
> getSystemPropertyValue which accesses and retrieves tenant specific 
> properties is never called/used regarding default settings for a tenant.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to