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(),