[
https://issues.apache.org/jira/browse/FELIX-1846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger closed FELIX-1846.
------------------------------------
Closing since version is released.
> When updated configuration of component without a previously set target
> filter, NullPointerException is thrown
> --------------------------------------------------------------------------------------------------------------
>
> Key: FELIX-1846
> URL: https://issues.apache.org/jira/browse/FELIX-1846
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.2.0
> Environment: 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
> Reporter: Zachery Jensen
> Assignee: Felix Meschberger
> Priority: Blocker
> Fix For: scr-1.4.0
>
>
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.