Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
scr-1.2.0
-
None
-
Java 1.5 on Mac, Felix 2.0.1 started by Pax Runner, build based on Revision: 832970 from http://svn.apache.org/repos/asf/felix/trunk
Description
If the target filter is undefined for a component before a change is made to its configuration (in this case, by way of config admin and fileinstall) it will always throw this NullPointerException because the clause at the associated line of code is bad. It doesn't sufficiently guard for null return values for getTarget() before potentially dereferencing off getTarget()'s return.
Workaround is to set any target filter, though that's not an acceptable workaround in my opinion... at least it works.
If a target filter is set it seems to work as expected.
ERROR Unexpected problem delivery configuration event to [org.osgi.service.cm.ConfigurationListener, id=24, bundle=3]
java.lang.NullPointerException
at org.apache.felix.scr.impl.manager.DependencyManager.canUpdateDynamically(DependencyManager.java:1068)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.modify(ImmediateComponentManager.java:432)
at org.apache.felix.scr.impl.manager.ImmediateComponentManager.reconfigure(ImmediateComponentManager.java:401)
at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.configurationUpdated(ConfiguredComponentHolder.java:187)
at org.apache.felix.scr.impl.config.ConfigurationComponentRegistry.configurationEvent(ConfigurationComponentRegistry.java:173)
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1693)
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:88)