Hyunsun Moon
Committed by Gerrit Code Review

Fix to return empty list not null if there is no rows in Controller table

Change-Id: If1ff8c229cfafdd25c5cef4029c6f31dc5cfb6d8
...@@ -175,14 +175,19 @@ public class DefaultOvsdbClient ...@@ -175,14 +175,19 @@ public class DefaultOvsdbClient
175 * 175 *
176 * @param dbName the ovsdb database name 176 * @param dbName the ovsdb database name
177 * @param tableName the ovsdb table name 177 * @param tableName the ovsdb table name
178 - * @return ovsRowStore, empty if row store is find 178 + * @return ovsRowStore, empty store if no rows exist in the table
179 */ 179 */
180 private OvsdbRowStore getRowStore(String dbName, String tableName) { 180 private OvsdbRowStore getRowStore(String dbName, String tableName) {
181 OvsdbTableStore tableStore = getTableStore(dbName); 181 OvsdbTableStore tableStore = getTableStore(dbName);
182 if (tableStore == null) { 182 if (tableStore == null) {
183 return null; 183 return null;
184 } 184 }
185 - return tableStore.getRows(tableName); 185 +
186 + OvsdbRowStore rowStore = tableStore.getRows(tableName);
187 + if (rowStore == null) {
188 + rowStore = new OvsdbRowStore();
189 + }
190 + return rowStore;
186 } 191 }
187 192
188 /** 193 /**
......