Thomas Vachuska
Committed by Gerrit Code Review

Fixed a null pointer exception in SimpleMastershipStore; need to verify whether …

…same exists in distributed one.

Change-Id: I89ad124114586eb69bb9de3702085e8587cb315c
......@@ -23,6 +23,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
......@@ -173,7 +174,7 @@ public class SimpleMastershipStore
public Set<DeviceId> getDevices(NodeId nodeId) {
Set<DeviceId> ids = new HashSet<>();
for (Map.Entry<DeviceId, NodeId> d : masterMap.entrySet()) {
if (d.getValue().equals(nodeId)) {
if (Objects.equals(d.getValue(), nodeId)) {
ids.add(d.getKey());
}
}
......