Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Make methods static
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
entityownership
/
EntityOwnershipStatistics.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipStatistics.java
b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipStatistics.java
index 3ea4362ac9b2a08190ea368a7e6b4e24c55cafbd..02bd00bfb1e43a7dfcd01c7fb98f85f64529f387 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipStatistics.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipStatistics.java
@@
-65,7
+65,10
@@
class EntityOwnershipStatistics extends AbstractEntityOwnerChangeListener {
}
Map<String, Long> byEntityType(String entityType){
}
Map<String, Long> byEntityType(String entityType){
- return statistics.get(entityType).readOnlySnapshot();
+ if(statistics.get(entityType) != null) {
+ return statistics.get(entityType).readOnlySnapshot();
+ }
+ return new HashMap<>();
}
private void updateStatistics(String entityType, String candidateName, long count){
}
private void updateStatistics(String entityType, String candidateName, long count){