This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch http-4.x
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/http-4.x by this push:
     new 4318693e09 FELIX-6747 - NPE in activator of webconsole (#366)
4318693e09 is described below

commit 4318693e09ecb4da8b0c76501d98f369d05d998c
Author: Sagar Miglani <[email protected]>
AuthorDate: Tue Jan 14 12:23:21 2025 +0530

    FELIX-6747 - NPE in activator of webconsole (#366)
---
 .../felix/webconsole/internal/servlet/OsgiManager.java      | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
 
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
index 7d8e2d9360..93a66eca77 100644
--- 
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
+++ 
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
@@ -342,12 +342,6 @@ public class OsgiManager extends GenericServlet {
         brandingTracker = new BrandingServiceTracker(this);
         brandingTracker.open();
 
-        this.requiredSecurityProviders = 
splitCommaSeparatedString(bundleContext.getProperty(FRAMEWORK_PROP_SECURITY_PROVIDERS));
-
-        // add support for pluggable security
-        securityProviderTracker = new ServiceTracker<>(bundleContext, 
WebConsoleSecurityProvider.class,
-                                          new 
UpdateDependenciesStateCustomizer());
-        securityProviderTracker.open();
 
         // load the default configuration from the framework
         this.defaultConfiguration = new HashMap<>();
@@ -371,6 +365,13 @@ public class OsgiManager extends GenericServlet {
         // configure and start listening for configuration
         updateConfiguration(null);
 
+        this.requiredSecurityProviders = 
splitCommaSeparatedString(bundleContext.getProperty(FRAMEWORK_PROP_SECURITY_PROVIDERS));
+
+        // add support for pluggable security
+        securityProviderTracker = new ServiceTracker<>(bundleContext, 
WebConsoleSecurityProvider.class,
+                new UpdateDependenciesStateCustomizer());
+        securityProviderTracker.open();
+
         // register managed service as a service factory
         this.configurationListener = bundleContext.registerService( 
"org.osgi.service.cm.ManagedService",
             new ServiceFactory()

Reply via email to