mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-11-03 17:51:26 +01:00
Fixed a null pointer exception in SimpleMastershipStore; need to verify whether same exists in distributed one.
Change-Id: I89ad124114586eb69bb9de3702085e8587cb315c
This commit is contained in:
parent
27d322d683
commit
a68be8199f
@ -23,6 +23,7 @@ import java.util.HashMap;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
@ -173,7 +174,7 @@ public class SimpleMastershipStore
|
|||||||
public Set<DeviceId> getDevices(NodeId nodeId) {
|
public Set<DeviceId> getDevices(NodeId nodeId) {
|
||||||
Set<DeviceId> ids = new HashSet<>();
|
Set<DeviceId> ids = new HashSet<>();
|
||||||
for (Map.Entry<DeviceId, NodeId> d : masterMap.entrySet()) {
|
for (Map.Entry<DeviceId, NodeId> d : masterMap.entrySet()) {
|
||||||
if (d.getValue().equals(nodeId)) {
|
if (Objects.equals(d.getValue(), nodeId)) {
|
||||||
ids.add(d.getKey());
|
ids.add(d.getKey());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user