Source:
private synchronized void updateConfigurationsInternal(List<ComponentConfiguration> configsToUpdate, boolean takeSnapshot) throws KuraException { boolean snapshotOnConfirmation = false; List<Throwable> causes = new ArrayList<Throwable>(); List<ComponentConfiguration> configs = buildCurrentConfiguration(configsToUpdate); for (ComponentConfiguration config : configs) { for (ComponentConfiguration configToUpdate : configsToUpdate) { if (config.getPid().equals(configToUpdate.getPid())) { try { updateConfigurationInternal(config.getPid(), config.getConfigurationProperties(), snapshotOnConfirmation); } catch (KuraException e) { logger.warn("Error during updateConfigurations for component " + config.getPid(), e); causes.add(e); } break; } } } for (ComponentConfiguration config : configsToUpdate) { String factoryPid = null; final Map<String, Object> properties = config.getConfigurationProperties(); if (properties != null) { factoryPid = (String) properties.get(ConfigurationAdmin.SERVICE_FACTORYPID); } if (factoryPid != null && !this.allActivatedPids.contains(config.getPid())) { String pid = config.getPid(); logger.info("Creating configuration with pid: and factory pid: {}", pid, factoryPid); try { createFactoryConfiguration(factoryPid, pid, properties, false); configs.add(config); } catch (KuraException e) { logger.warn("Error creating configuration with pid: " + pid + " and factory pid: {}", factoryPid, e); } } } if (takeSnapshot && configs != null && !configs.isEmpty()) { saveSnapshot(configs); } if (!causes.isEmpty()) { throw new KuraPartialSuccessException("updateConfigurations", causes); } }

Target:
private synchronized void updateConfigurationsInternal(List<ComponentConfiguration> configsToUpdate, boolean takeSnapshot) throws KuraException { boolean snapshotOnConfirmation = false; List<Throwable> causes = new ArrayList<Throwable>(); List<ComponentConfiguration> configs = buildCurrentConfiguration(configsToUpdate); for (ComponentConfiguration config : configs) { for (ComponentConfiguration configToUpdate : configsToUpdate) { if (config.getPid().equals(configToUpdate.getPid())) { try { updateConfigurationInternal(config.getPid(), config.getConfigurationProperties(), snapshotOnConfirmation); } catch (KuraException e) { logger.warn("Error during updateConfigurations for component " + config.getPid(), e); causes.add(e); } break; } } } for (ComponentConfiguration config : configsToUpdate) { String factoryPid = null; final Map<String, Object> properties = config.getConfigurationProperties(); if (properties != null) { factoryPid = (String) properties.get(ConfigurationAdmin.SERVICE_FACTORYPID); } if (factoryPid != null && !this.allActivatedPids.contains(config.getPid())) { String pid = config.getPid(); logger.info("Creating configuration with pid: and factory pid: {}", pid, factoryPid); try { createFactoryConfiguration(factoryPid, pid, properties, false); configs.add(config); } catch (KuraException e) { logger.warn("Error creating configuration with pid: and factory pid: {}", pid, factoryPid, e); } } } if (takeSnapshot && configs != null && !configs.isEmpty()) { saveSnapshot(configs); } if (!causes.isEmpty()) { throw new KuraPartialSuccessException("updateConfigurations", causes); } }