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

Stefan Seifert closed SLING-11649.
----------------------------------

> Check for null BundleContext while registering bundle resources
> ---------------------------------------------------------------
>
>                 Key: SLING-11649
>                 URL: https://issues.apache.org/jira/browse/SLING-11649
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Eric Norman
>            Assignee: Eric Norman
>            Priority: Major
>             Fix For: Bundle Resource Provider 2.4.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> While registering bundle resources the BundleContext may be null in some 
> circumstances.
> I have encountered this stack trace:
> {noformat}
> java.lang.NullPointerException: null
>     at 
> org.apache.sling.bundleresource.impl.BundleResourceProvider.registerService(BundleResourceProvider.java:69)
>  [org.apache.sling.bundleresource.impl:2.3.4]
>     at 
> org.apache.sling.bundleresource.impl.Activator.addBundleResourceProvider(Activator.java:142)
>  [org.apache.sling.bundleresource.impl:2.3.4]
>     at 
> org.apache.sling.bundleresource.impl.Activator.bundleChanged(Activator.java:99)
>  [org.apache.sling.bundleresource.impl:2.3.4]
>     at 
> org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915)
>     at 
> org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834)
>     at 
> org.apache.felix.framework.EventDispatcher.run(EventDispatcher.java:1147)
>     at 
> org.apache.felix.framework.EventDispatcher.access$000(EventDispatcher.java:54)
>     at 
> org.apache.felix.framework.EventDispatcher$1.run(EventDispatcher.java:102)
>     at java.base/java.lang.Thread.run(Thread.java:829)
> {noformat}
> Expected:
> Check for null BundleContext before using it and report a more meaningful 
> error message if null.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to