commit | 8946177548ff6bba9b1c9350ecfcfcc871de3878 | [log] [tgz] |
---|---|---|
author | HIGUCHI Yuta <y-higuchi@ak.jp.nec.com> | Tue Jan 26 12:18:10 2016 -0800 |
committer | Gerrit Code Review <gerrit@onlab.us> | Tue Jan 26 21:28:50 2016 +0000 |
tree | de602f88bccb94ca955292b1b7c9edf5d78a3368 | |
parent | 7cfd4433cbca0d8a2f5b55ebf0fc7a3e1a15a602 [diff] |
Bugfix for DeviceStores - Should never return null, when return type is a Collection Change-Id: I85eb27bf702b5e76facf83db29ab264cf85a6755
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java index a47df89..129fbbe 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/ECDeviceStore.java
@@ -422,7 +422,7 @@ // Only forward for ConfigProvider // Forwarding was added as a workaround for ONOS-490 if (!providerId.scheme().equals("cfg")) { - return null; + return Collections.emptyList(); } if (master == null) { return Collections.emptyList();
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java index 333531e..53809d1 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
@@ -586,7 +586,7 @@ // Only forward for ConfigProvider // Forwarding was added as a workaround for ONOS-490 if (!providerId.scheme().equals("cfg")) { - return null; + return Collections.emptyList(); } // FIXME Temporary hack for NPE (ONOS-1171). // Proper fix is to implement forwarding to master on ConfigProvider