Code Review
/
lispflowmapping.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Improve ConcurrentLispSouthboundStats
[lispflowmapping.git]
/
mappingservice
/
southbound
/
src
/
main
/
java
/
org
/
opendaylight
/
lispflowmapping
/
southbound
/
ConcurrentLispSouthboundStats.java
diff --git
a/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/ConcurrentLispSouthboundStats.java
b/mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/ConcurrentLispSouthboundStats.java
index fc8ee16e2473a488828bf9e3828f1cad5129d980..3e0fd08a3164197fdc0aa7b2caad4da06a87d594 100644
(file)
--- a/
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/ConcurrentLispSouthboundStats.java
+++ b/
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/ConcurrentLispSouthboundStats.java
@@
-84,12
+84,8
@@
public class ConcurrentLispSouthboundStats {
this.cacheMisses = incrementWithWrap(cacheMisses);
}
this.cacheMisses = incrementWithWrap(cacheMisses);
}
- private static synchronized long incrementWithWrap(long value) {
- if (value == Long.MAX_VALUE) {
- return 0;
- } else {
- return value + 1;
- }
+ private static long incrementWithWrap(long value) {
+ return value == Long.MAX_VALUE ? 0 : value + 1;
}
// TODO move this method to the appropriate helper class if we start using MessageType in other places
}
// TODO move this method to the appropriate helper class if we start using MessageType in other places