diff --git a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java index 17edeff..3dfce25 100644 --- a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java +++ b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java @@ -1983,18 +1983,22 @@ public class OvsdbDao { fResult = ovsdbClient.transact(ovsdbName, operations); result = fResult.get(ovsdbTimeoutSec, TimeUnit.SECONDS); - Set vifConfigsSet = null; + Set vifConfigsSet = new HashSet(); if (result != null && result.length > 0 && !((SelectResult) result[0]).getRows().isEmpty()) { row = ((SelectResult) result[0]).getRows().iterator().next(); if (row != null) { vifConfigsSet = row.getSetColumn("vif_configs"); - } else { - vifConfigsSet = new HashSet(); + if(vifConfigsSet == null) { + vifConfigsSet = new HashSet(); + } } } - vifConfigsSet.add(vifConfigUuid); + if(vifConfigUuid!=null) { + vifConfigsSet.add(vifConfigUuid); + } + com.vmware.ovsdb.protocol.operation.notation.Set vifConfigs = com.vmware.ovsdb.protocol.operation.notation.Set .of(vifConfigsSet);