Merge "A little extra protection against nulls in ConfigPusher"
authorTony Tkacik <ttkacik@cisco.com>
Wed, 6 Aug 2014 14:54:41 +0000 (14:54 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 6 Aug 2014 14:54:41 +0000 (14:54 +0000)
opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusher.java

index eddad8b4c7c1df593c45a5f829c3c56828339e18..fff8d611b7975b34dce89ce603f164603ea2b582 100644 (file)
@@ -65,9 +65,11 @@ public class ConfigPusher {
         LinkedHashMap<ConfigSnapshotHolder, EditAndCommitResponse> result = new LinkedHashMap<>();
         // start pushing snapshots:
         for (ConfigSnapshotHolder configSnapshotHolder : configs) {
-            EditAndCommitResponse editAndCommitResponseWithRetries = pushConfigWithConflictingVersionRetries(configSnapshotHolder);
-            logger.debug("Config snapshot pushed successfully: {}, result: {}", configSnapshotHolder, result);
-            result.put(configSnapshotHolder, editAndCommitResponseWithRetries);
+            if(configSnapshotHolder != null) {
+                EditAndCommitResponse editAndCommitResponseWithRetries = pushConfigWithConflictingVersionRetries(configSnapshotHolder);
+                logger.debug("Config snapshot pushed successfully: {}, result: {}", configSnapshotHolder, result);
+                result.put(configSnapshotHolder, editAndCommitResponseWithRetries);
+            }
         }
         logger.debug("All configuration snapshots have been pushed successfully.");
         return result;