felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zachery Jensen (JIRA)" <j...@apache.org>
Subject [jira] Created: (FELIX-1846) When updated configuration of component without a previously set target filter, NullPointerException is thrown
Date Thu, 05 Nov 2009 12:07:03 GMT
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)
         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
            Priority: Blocker

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]
	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.

View raw message