This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new 82bc11c FELIX-6367 add null check (#94)
82bc11c is described below
commit 82bc11cc32c21bb42c93b375802f547cefd99472
Author: Eric Norman <[email protected]>
AuthorDate: Sun Aug 29 22:16:00 2021 -0700
FELIX-6367 add null check (#94)
services returned from the spiTracker may be null
---
.../felix/webconsole/internal/configuration/ConfigManager.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java
index 221871f..019d508 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java
@@ -438,8 +438,11 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
Object configurationAdmin = getService( CONFIGURATION_ADMIN_NAME );
if ( configurationAdmin != null ) {
final List<ConfigurationHandler> handlers = new ArrayList<>();
- for(final Object o : this.spiTracker.getServices()) {
- handlers.add((ConfigurationHandler)o);
+ Object[] services = this.spiTracker.getServices();
+ if (services != null) {
+ for(final Object o : services) {
+ handlers.add((ConfigurationHandler)o);
+ }
}
return new ConfigAdminSupport( this, configurationAdmin, handlers
);
}