Fix for NPE during GBP testing. 43/19343/1
authorThomas Bachman <tbachman@yahoo.com>
Wed, 29 Apr 2015 19:57:33 +0000 (15:57 -0400)
committerThomas Bachman <tbachman@yahoo.com>
Wed, 29 Apr 2015 19:59:36 +0000 (15:59 -0400)
This addresses an NPE that happens if the
controller entry "isConnected" isn't set but
is referenced.

Signed-off-by: Thomas Bachman <tbachman@yahoo.com>
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbBridgeUpdateCommand.java

index 5958156a60aa007b4a73b4d82f2d640be8a08345..094d759b378696c0121739e997d2ca844e287650 100644 (file)
@@ -325,7 +325,8 @@ public class OvsdbBridgeUpdateCommand extends AbstractTransactionCommand {
         Map<UUID, Controller> updatedControllerRows =
                 TyperUtils.extractRowsUpdated(Controller.class, getUpdates(), getDbSchema());
         for (ControllerEntry controllerEntry: SouthboundMapper.createControllerEntries(bridge, updatedControllerRows)) {
-            if (controllerEntry != null && controllerEntry.isIsConnected()) {
+            if (controllerEntry != null
+                && controllerEntry.isIsConnected() != null && controllerEntry.isIsConnected()) {
                 String [] controllerTarget = controllerEntry.getTarget().getValue().split(":");
                 IpAddress bridgeControllerIpAddress = null;
                 PortNumber bridgeControllerPortNumber = null;