commit | 74e5913ec3a7ee58b207ba2501cc5a53e15bf644 | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@opennetworking.org> | Wed Jan 17 15:24:52 2018 -0800 |
committer | Thomas Vachuska <tom@opennetworking.org> | Thu Jan 18 19:01:54 2018 +0000 |
tree | 3b5cb1fa86d9180ef7e08d4fc2caf27cec45ad39 | |
parent | 325c7575fa161fb83a2c8e1e512bdf6795063fc4 [diff] [blame] |
Sonar suggestions - fixes to potential null pointer dereferences Change-Id: I4e350a9d72a9322971d5d4f831f1bdf167986b87
diff --git a/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java b/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java index dcf58e6..9cf9856 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java
@@ -477,7 +477,7 @@ } } - if (existingHosts.isEmpty()) { + if (existingHosts == null || existingHosts.isEmpty()) { return null; } return existingHosts;