[jira] [Commented] (OFBIZ-9394) FileUtil.java: New method to get absolute path from given relative path on base of ofbiz.home dir

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-9394) FileUtil.java: New method to get absolute path from given relative path on base of ofbiz.home dir

Nicolas Malin (Jira)

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

Martin Becker commented on OFBIZ-9394:
--------------------------------------

i'll close this issue for the following reasons:

* It is a really trivial function of only extending a given relative and unchecked path with ofbiz.home value, that already exists in UtilUrl but with other return type (and with check for file existence)
* It does not really match the intention of file (handling) utilities currently found in FileUtil
* It more matches the intention of the utils named by Deepak, even if those are of the kind of complex module path handling with defined path types, not only a simple relative file path

> FileUtil.java: New method to get absolute path from given relative path on base of ofbiz.home dir
> -------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-9394
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9394
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Martin Becker
>            Priority: Trivial
>         Attachments: OFBIZ-9394_absolutePathOfbizHome.patch
>
>
> This patch adds a method getAbsolutePathWithOfbizHome(String filename) to FileUtil.java. It returns by the given filename the absolute path starting with "ofbiz.home". Note that a quite similar method already exists in UtilURL.fromOfbizHomePath(String filename).
> While both methods share similar code, the idea of extracting the duplicated code into another method or even class results in unnecessary imports (one or the other has to hold such a method and the other has to import the holding class) and thus has not been and shouldn't be done in the future.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)