add null check
services returned from the spiTracker may be null
@@ -438,9 +438,12 @@ 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()) {
+ Object[] services = this.spiTracker.getServices();
+ if (services != null) {
+ for(final Object o : services) {
handlers.add((ConfigurationHandler)o);
}
+ }
return new ConfigAdminSupport( this, configurationAdmin, handlers );
}
return null;
