From 6a1ed80c4fd6cb9ec0809080b1ea7b042f367687 Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Tue, 5 Aug 2014 23:24:02 -0500 Subject: [PATCH] A little extra protection against nulls in ConfigPusher Change-Id: I4aab592b028b8336370c23924fcbf69858b7a6bd Signed-off-by: Ed Warnicke --- .../controller/netconf/persist/impl/ConfigPusher.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusher.java b/opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusher.java index eddad8b4c7..fff8d611b7 100644 --- a/opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusher.java +++ b/opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusher.java @@ -65,9 +65,11 @@ public class ConfigPusher { LinkedHashMap 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; -- 2.36.6