From: Madhu Venugopal Date: Sat, 25 Jan 2014 00:04:27 +0000 (-0800) Subject: Relaxing a strict check in updateNode in SwitchManager to handle a condition in which... X-Git-Tag: jenkins-controller-bulk-release-prepare-only-2-7~1^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=82e3a5c7a6d2bbce5dffe0bae63393379a42ac75;ds=sidebyside Relaxing a strict check in updateNode in SwitchManager to handle a condition in which the adaptor fails to call the addNode. The existing ADSAL code is already robust enough to handle the scenario of NodeProps not containing the a node Key. Also, there are cases in which an application might just want to see an update event for processing (especially when the addNode events are missing). Change-Id: I6561f2f34220b2372b142307754f086a2abe42fd Signed-off-by: Madhu Venugopal --- diff --git a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java index 5b2687fb3b..674da37afb 100644 --- a/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java +++ b/opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java @@ -1103,8 +1103,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa private void updateNode(Node node, Set props) { log.trace("{} updated, props: {}", node, props); - if (nodeProps == null || !nodeProps.containsKey(node) || - props == null || props.isEmpty()) { + if (nodeProps == null || props == null) { return; }