You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2011/02/04 21:04:31 UTC
[jira] Resolved: (FELIX-2766) Calling update() on a newly created
factory configuration causes FileNotFoundException
[ https://issues.apache.org/jira/browse/FELIX-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved FELIX-2766.
--------------------------------------
Resolution: Fixed
Assignee: Felix Meschberger
I chose a slightly different approach in that I check for the existence of configuration in the update() method itself and only read if so.
In addition the UpdateTask has a bug with respect to updating newly created configurations: When updating ManagedServiceFactory services nothing is done; when updating ManagedService services a NullPointerException is thrown because there is no guard against no dictionary (as is the case for newly created configurations. To fix this, the UpdateTask assumes an empty dictionary for newly created configurations whose getProperties() method returns null
Fixed in Rev. 1067270
> Calling update() on a newly created factory configuration causes FileNotFoundException
> --------------------------------------------------------------------------------------
>
> Key: FELIX-2766
> URL: https://issues.apache.org/jira/browse/FELIX-2766
> Project: Felix
> Issue Type: Bug
> Affects Versions: configadmin-1.2.8
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: configadmin-1.2.10
>
> Attachments: felix-2766.diff
>
>
> The following code throws java.io.FileNotFoundException
> Configuration config = configurationAdmin.createFactoryConfiguration(name, null);
> config.update();
> because the Configuration is newly created and has never been persisted, but the update() method tries to read the persistence file.
> According to a comment by Peter Kriens on the OSGi Dev List [1], the update() method should in this case just assume an empty dictionary and push this past the configuration plugins into the ManagedServiceFactory service.
> [1] http://www.mail-archive.com/osgi-dev@mail.osgi.org/msg01773.html
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira