You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carl Hall (JIRA)" <ji...@apache.org> on 2011/02/16 06:34:57 UTC
[jira] Issue Comment Edited: (FELIX-2843) Parsing PID assumes last
4 chars are file extension
[ https://issues.apache.org/jira/browse/FELIX-2843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995174#comment-12995174 ]
Carl Hall edited comment on FELIX-2843 at 2/16/11 5:32 AM:
-----------------------------------------------------------
Attaching patch of suggested solution. The patch changes the assumption from "everything before the last 4 chars are the pid" to "find the last . and assume everything before that is the pid."
All files processed will have an extension (.cfg, .config) as checked by the method that calls parsePid, ConfigInstall.setConfig.
was (Author: thecarlhall):
Attaching patch of suggested solution. The patch changes the assumption from "everything before the last 4 chars are the pid" to "find the last . and assume everything before that is the pid."
> Parsing PID assumes last 4 chars are file extension
> ---------------------------------------------------
>
> Key: FELIX-2843
> URL: https://issues.apache.org/jira/browse/FELIX-2843
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-3.1.10
> Reporter: Carl Hall
> Priority: Blocker
> Attachments: felix-2843.diff
>
>
> In ConfigInstaller.parsePid(String), to clear off the path extension the following logic is used.
> String pid = path.substring(0, path.length() - 4);
> This appears to be a leftover from when only .cfg (4 chars) was allowed as a file extension. Since .config is now a valid file extension, the above logic leaves ".co" on the end of the service pid that is parsed out.
> This blocks configuring of services when a configuration file ending with .config is used. .config syntax is required if a property needs to be something like String[].
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira