commit | 30f35b2affd36268e7d8dc9ff577292852911ab1 | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@opennetworking.org> | Thu Jun 21 14:56:47 2018 -0700 |
committer | Ray Milkey <ray@opennetworking.org> | Mon Jul 02 21:15:46 2018 +0000 |
tree | bb581f284cad9ca92c59ddda4bd40b9e51a00284 | |
parent | c5e2f43a8a54f1aef8d2d39fbfb69f0a6199652e [diff] |
Fix error prone reported probem with map key type Change-Id: Iaeb1aa3b5d23dfb7a4d7755787514c1571aa192f (cherry picked from commit 186d9fb43bfa079c3454966372e81897541f95cf)
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualMastershipStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualMastershipStore.java index 346999b..e88421b 100644 --- a/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualMastershipStore.java +++ b/incubator/store/src/main/java/org/onosproject/incubator/store/virtual/impl/SimpleVirtualMastershipStore.java
@@ -196,10 +196,11 @@ if (master != null) { roleBuilder.put(master, MastershipRole.MASTER); } - backups.getOrDefault(master, Collections.emptyList()) + backups.getOrDefault(deviceId, Collections.emptyList()) .forEach(nodeId -> roleBuilder.put(nodeId, MastershipRole.STANDBY)); clusterService.getNodes().stream() .filter(node -> !masterMap.containsValue(node.id())) + .filter(node -> !backups.get(deviceId).contains(node.id())) .forEach(node -> roleBuilder.put(node.id(), MastershipRole.NONE)); return new MastershipInfo( termMap.getOrDefault(deviceId, new AtomicInteger(NOTHING)).get(),