Thomas Watson created FELIX-6159:
------------------------------------
Summary: Possible IllegalStateException for deleted Configuration
from config admin
Key: FELIX-6159
URL: https://issues.apache.org/jira/browse/FELIX-6159
Project: Felix
Issue Type: Improvement
Components: Declarative Services (SCR)
Affects Versions: scr-2.1.16
Reporter: Thomas Watson
{{org.apache.felix.scr.impl.manager.RegionConfigurationSupport}} holds the
support in SCR for dealing with configurations for components. This class does
not handle the various methods on {{org.osgi.service.cm.Configuration}} that
can throw an {{IllegalStateException}} if the configuration is deleted, for
example:
* org.osgi.service.cm.Configuration.getPid()
* org.osgi.service.cm.Configuration.getProperties()
* org.osgi.service.cm.Configuration.getProcessedProperties(ServiceReference<?>)
* org.osgi.service.cm.Configuration.getFactoryPid()
* org.osgi.service.cm.Configuration.getChangeCount()
* org.osgi.service.cm.Configuration.getAttributes()
This leaves SCR open to failing if the configuration has been deleted after SCR
has gotten the configuration from {{ConfigurationAdmin}} but before SCR has
been able to use the configuration to configure a component. Instead of having
a catastrophic failure that bubbles the IllegalStateException up the stack, SCR
should handle the exception and treat it as if the configuration was never
found in the first place.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)