diff options
Diffstat (limited to 'id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java')
-rw-r--r-- | id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java index 9238ea3df..59f36f475 100644 --- a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java +++ b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/MOAIDConfigurationModul.java @@ -179,7 +179,10 @@ public class MOAIDConfigurationModul implements ConfigurationModul{ throws ConfigurationStorageException { logger.debug("Start configuration saving process ..."); - MOAIDConfigurationValidator configValidator = new MOAIDConfigurationValidator(); + MOAIDConfigurationValidator configValidator = new MOAIDConfigurationValidator(); + if (deleted == null) + deleted = new ArrayList<String>(); + int numOfGroups = configValidator.preProcess(changed, added, deleted); if (configValidator.getPreProcessedConfigurationData() != null && @@ -238,18 +241,20 @@ public class MOAIDConfigurationModul implements ConfigurationModul{ } private void deleteEntries(List<String> deleted) { - logger.debug("Delete {} keys pairs from configuration", deleted.size()); - Iterator<String> deleteInterator = deleted.iterator(); - while (deleteInterator.hasNext()) { - String el = deleteInterator.next(); - try { - config.deleteIds(el); - logger.trace("Delete key {}", el); - - } catch (ConfigurationException e) { - logger.error("Delete key: " + el + " FAILED.", e); + if (deleted != null) { + logger.debug("Delete {} keys pairs from configuration", deleted.size()); + Iterator<String> deleteInterator = deleted.iterator(); + while (deleteInterator.hasNext()) { + String el = deleteInterator.next(); + try { + config.deleteIds(el); + logger.trace("Delete key {}", el); - } + } catch (ConfigurationException e) { + logger.error("Delete key: " + el + " FAILED.", e); + + } + } } } |