X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=mappingservice%2Fsouthbound%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Flispflowmapping%2Fsouthbound%2FConcurrentLispSouthboundStats.java;h=3e0fd08a3164197fdc0aa7b2caad4da06a87d594;hb=1db1a702516cf9ae84860c868e165f0d19aa5cb4;hp=fc8ee16e2473a488828bf9e3828f1cad5129d980;hpb=e5b0e0610f0be13a843e289f5a7962ee09327a5d;p=lispflowmapping.git 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 fc8ee16e2..3e0fd08a3 100644 --- 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); } - 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