felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jencks (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FELIX-3967) [DS] NPE in DependencyManager$AbstractCustomizer.isSatisfied
Date Tue, 15 Oct 2013 23:27:42 GMT

     [ https://issues.apache.org/jira/browse/FELIX-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Jencks closed FELIX-3967.
-------------------------------


> [DS] NPE in DependencyManager$AbstractCustomizer.isSatisfied
> ------------------------------------------------------------
>
>                 Key: FELIX-3967
>                 URL: https://issues.apache.org/jira/browse/FELIX-3967
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.8.0
>            Reporter: David Jencks
>            Assignee: David Jencks
>             Fix For: scr-1.8.0
>
>
> We set the customizer before installing the tracker in the customizer, so 
>         public boolean isSatisfied()
>         {
>             return isOptional() || !tracker.isEmpty();
>         }
> can give an NPE like this:
>  java.lang.NullPointerException
> >	at org.apache.felix.scr.impl.manager.DependencyManager$AbstractCustomizer.isSatisfied(DependencyManager.java:183)
> >	at org.apache.felix.scr.impl.manager.DependencyManager.isSatisfied(DependencyManager.java:1254)
> >	at org.apache.felix.scr.impl.manager.AbstractComponentManager.verifyDependencyManagers(AbstractComponentManager.java:1034)
> >	at org.apache.felix.scr.impl.manager.AbstractComponentManager$Unsatisfied.activate(AbstractComponentManager.java:1465)
> >	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:643)
> >	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:822)
> >	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:795)
> >	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1474)
> >	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1398)
> >	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1210)
> >	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1148)
> >	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1429)
> Presumably setting the tracker before making the customizer available will fix the problem



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message