[
https://issues.apache.org/jira/browse/FELIX-5711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet resolved FELIX-5711.
------------------------------------
Resolution: Cannot Reproduce
Assignee: Guillaume Nodet
I think this has been fixed in fileinstall-3.6.2. I can reproduce it with
3.6.0 but not with 3.6.2.
> FileInstall drops escape characters when writing configuration file back to
> disk
> --------------------------------------------------------------------------------
>
> Key: FELIX-5711
> URL: https://issues.apache.org/jira/browse/FELIX-5711
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-3.6.0
> Reporter: Eric Lessard
> Assignee: Guillaume Nodet
>
> FileInstall allows substitution characters to be escaped so they are kept
> as-is when read from a configuration file and in memory. So, for the
> following configuration file property:
> {noformat}
> property = $\{value\}
> {noformat}
> The following key/value pair will be present in memory:
> {noformat}
> property, ${value}
> {noformat}
> This works well unless FileInstall is configured to write the configurations
> back to disk ({{felix.fileinstall.enableConfigSave=true}}). In that case, the
> value is written back to the file as-is, i.e., without the escape characters:
> {noformat}
> property = ${value}
> {noformat}
> At that point, if the file needs to be read back in (e.g., content or time
> stamp of the file changes), substitution will occurs since the substitution
> characters were not escaped when the value was written back out to the file.
> Since the only way for the substitution characters to be present in memory
> inside a value is if they have been previously escaped when the file was read
> in, then they should also be escaped when written back out so they remain
> unchanged if they ever need to be read in again.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)