felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "munene kiruja (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5252) FileInstall can write "service.bundleLocation" into OSGi configuration files
Date Tue, 10 May 2016 22:06:12 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15279076#comment-15279076

munene kiruja commented on FELIX-5252:

Hi David, I'm sorry if I created an opportunity for misunderstanding. The information I referred
to is necessary to keep in the internal structures for the runtime, but is removed from copies
of the structures that are being persisted to configuration files, which are used across runtimes
and represent the configuration that is relevant to the human user. This information is irrelevant
to the user. Perhaps a bit more context might clarify things:

                        org.apache.felix.utils.properties.Properties props = new org.apache.felix.utils.properties.Properties(
file, context );
                        for( Enumeration e  = dict.keys(); e.hasMoreElements(); )
                            String key = e.nextElement().toString();
                            if( !Constants.SERVICE_PID.equals(key)
                                    && !ConfigurationAdmin.SERVICE_FACTORYPID.equals(key)
                                    && !ConfigurationAdmin.SERVICE_BUNDLELOCATION.equals(key)
                                    && !DirectoryWatcher.FILENAME.equals(key) )
                                String val = dict.get( key ).toString();
                                props.put( key, val );

Here we can see that the dict is the internal structure and is left intact, and the props
that is persisted to file has the runtime artifacts gutted out.

> FileInstall can write "service.bundleLocation" into OSGi configuration files
> ----------------------------------------------------------------------------
>                 Key: FELIX-5252
>                 URL: https://issues.apache.org/jira/browse/FELIX-5252
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-3.5.0
>            Reporter: munene kiruja
>         Attachments: ConfigInstaller.java
> Information referenced by "service.bundleLocation" key is internal details that relevant
only to the current instance of the executable and as such should not be in the configuration
> ConfigInstaller.java checks for and removes information about other internal information
and could most naturally handle this key as well.

This message was sent by Atlassian JIRA

View raw message