You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Ross Laidlaw (JIRA)" <ji...@apache.org> on 2013/07/27 20:47:48 UTC
[jira] [Created] (OODT-649) Add PathUtils.replaceEnvVariables()
wrapper around retrieved context parameters
Ross Laidlaw created OODT-649:
---------------------------------
Summary: Add PathUtils.replaceEnvVariables() wrapper around retrieved context parameters
Key: OODT-649
URL: https://issues.apache.org/jira/browse/OODT-649
Project: OODT
Issue Type: Sub-task
Components: product server
Affects Versions: 0.7
Reporter: Ross Laidlaw
Assignee: Ross Laidlaw
Priority: Minor
Fix For: 0.7
Methods in several classes in the cas.product.service.resources package retrieve parameters from the servlet context using the context.getInitParameter(String parameterName) method call, for example as follows:
{code}
setWorkingDirPath(context.getInitParameter("filemgr.working.dir"));
{code}
But these parameters may contain environment variables such as [HOME] or [FMPROD_HOME], etc. Currently, these aren't processed properly and the getInitParameter call needs to be wrapped in a call to PathUtils.replaceEnvVariables() (from the cas-metadata module) to process the environment variables, for example as follows:
{code}
setWorkingDirPath(PathUtils.replaceEnvVariables(
context.getInitParameter("filemgr.working.dir")));
{code}
This is already done in the original Data, RDF and RSS servlets but was accidentally omitted from the new resource classes in the cas.product.service.resources package.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira