Better handle configuration unbinding
-------------------------------------
Key: FELIX-3028
URL: https://issues.apache.org/jira/browse/FELIX-3028
Project: Felix
Issue Type: Bug
Components: Web Console
Affects Versions: webconsole-3.1.8
Reporter: Felix Meschberger
Assignee: Felix Meschberger
Fix For: webconsole-3.1.10
Unbinding of configuration in the ConfigManager class of the Web Console has
some issues:
(1) If not configuration exists for a provided PID when unbinding is requested,
a NullPointerException is thrown because the config variable is not null-checked
(2) Apache Felix Configuration Admin 1.2.8 sets and persists the static bundle
location with the Configuration.setBundleLocation call. On the other hand
internally a dynamic location is maintained if configuration is assigned to a
ManagedService[Factory]. If the static location is cleared, the dynamic
location is still set and calling Configuration.getBundleLocation still returns
that dynamically assigned value. With a work around we can force the dynamic
bundle location to also be cleared: If the bundle location is not null after
setBundleLocation(null), we do setBundleLocation(non-null);
setBundleLocation(null). The first call clears the dynamic bundle location
while setting the static location to some non-null value. The second call then
resets the static location back to null.
This second issue will probably be solved once the R4.3 Configuration Admin
specification is publiziced and implemented, which handles bundle location
setup in a more controlled manner.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira