Relaxing a strict check in updateNode in SwitchManager to handle a condition in which... 50/4750/1
authorMadhu Venugopal <mavenugo@gmail.com>
Sat, 25 Jan 2014 00:04:27 +0000 (16:04 -0800)
committerMadhu Venugopal <mavenugo@gmail.com>
Sat, 25 Jan 2014 00:04:27 +0000 (16:04 -0800)
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 <mavenugo@gmail.com>
opendaylight/switchmanager/implementation/src/main/java/org/opendaylight/controller/switchmanager/internal/SwitchManager.java

index 5b2687fb3b7e058a3f0bd18b0078c937fa6bd1a5..674da37afb5676a971905aefc3caf2a84eb2c761 100644 (file)
@@ -1103,8 +1103,7 @@ public class SwitchManager implements ISwitchManager, IConfigurationContainerAwa
 
     private void updateNode(Node node, Set<Property> props) {
         log.trace("{} updated, props: {}", node, props);
-        if (nodeProps == null || !nodeProps.containsKey(node) ||
-                props == null || props.isEmpty()) {
+        if (nodeProps == null || props == null) {
             return;
         }