[
https://issues.apache.org/jira/browse/FELIX-2213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846955#action_12846955
]
Alex Mulholland commented on FELIX-2213:
----------------------------------------
Yes that works just fine, thanks for the rapid turnaround!
> NPE when modifying properties of lazy (uninstantiated) service
> --------------------------------------------------------------
>
> Key: FELIX-2213
> URL: https://issues.apache.org/jira/browse/FELIX-2213
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.4.0
> Environment: Win XP
> Reporter: Alex Mulholland
> Assignee: Felix Meschberger
> Fix For: scr-1.4.0
>
>
> Service A is active and has a reference (ServiceReference) to Service B.
> Service B is not immediate and has not been activated. If at this point I
> update the properties for Service B in ConfigAdmin, I get the NPE below.
> The code appears to be going down the 'modified' path but I don't think that
> is appropriate in this scenario; I expected the new properties to be 'cached'
> by SCR until the service was activated. Workaround: if I resolve the
> ServiceReference to service B (causing it to activate) BEFORE updating the
> properties in ConfigAdmin, the problem does not occur and the modified method
> for service B is driven correctly.
> Exception in thread "pool-1-thread-3" java.lang.NullPointerException
> at
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.modify(ImmediateComponentManager.java:422)
> at
> org.apache.felix.scr.impl.manager.ImmediateComponentManager.reconfigure(ImmediateComponentManager.java:402)
> at
> org.apache.felix.scr.impl.config.ConfiguredComponentHolder.configurationUpdated(ConfiguredComponentHolder.java:187)
> at
> org.apache.felix.scr.impl.config.ConfigurationComponentRegistry.configurationEvent(ConfigurationComponentRegistry.java:173).
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.