HIGUCHI Yuta
Committed by Gerrit Code Review

Bugfix for DeviceStores

- Should never return null, when return type is a Collection

Change-Id: I85eb27bf702b5e76facf83db29ab264cf85a6755
...@@ -422,7 +422,7 @@ public class ECDeviceStore ...@@ -422,7 +422,7 @@ public class ECDeviceStore
422 // Only forward for ConfigProvider 422 // Only forward for ConfigProvider
423 // Forwarding was added as a workaround for ONOS-490 423 // Forwarding was added as a workaround for ONOS-490
424 if (!providerId.scheme().equals("cfg")) { 424 if (!providerId.scheme().equals("cfg")) {
425 - return null; 425 + return Collections.emptyList();
426 } 426 }
427 if (master == null) { 427 if (master == null) {
428 return Collections.emptyList(); 428 return Collections.emptyList();
......
...@@ -586,7 +586,7 @@ public class GossipDeviceStore ...@@ -586,7 +586,7 @@ public class GossipDeviceStore
586 // Only forward for ConfigProvider 586 // Only forward for ConfigProvider
587 // Forwarding was added as a workaround for ONOS-490 587 // Forwarding was added as a workaround for ONOS-490
588 if (!providerId.scheme().equals("cfg")) { 588 if (!providerId.scheme().equals("cfg")) {
589 - return null; 589 + return Collections.emptyList();
590 } 590 }
591 // FIXME Temporary hack for NPE (ONOS-1171). 591 // FIXME Temporary hack for NPE (ONOS-1171).
592 // Proper fix is to implement forwarding to master on ConfigProvider 592 // Proper fix is to implement forwarding to master on ConfigProvider
......