ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devanshu Vyas (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OFBIZ-9479) Use FlexibleLocation.resolveLocation() instead of hard-coded path
Date Sun, 09 Jul 2017 08:48:00 GMT
Devanshu Vyas created OFBIZ-9479:

             Summary: Use FlexibleLocation.resolveLocation() instead of hard-coded path
                 Key: OFBIZ-9479
                 URL: https://issues.apache.org/jira/browse/OFBIZ-9479
             Project: OFBiz
          Issue Type: Improvement
          Components: ALL COMPONENTS
    Affects Versions: Trunk
            Reporter: Devanshu Vyas
            Priority: Minor

I found some occurrences where file path URL is prepared using the actual path of the file
rather than the relative path. For e.g. 
String imgPropertyFullPath = System.getProperty("ofbiz.home") + "/applications/product/config/ImageProperties.xml";

IMO the location URL of files should be prepared dynamically using relative paths and this
can be achieved by using
FlexibleLocation.resolveLocation() method. This method covers all the scenarios and in future,
if we want to change anything, then all we need is to update the method and all instances
will be fixed.

This message was sent by Atlassian JIRA

View raw message