Merge "LLDP monitor interval update fixes"
authorVishal Thapar <vishal.thapar@ericsson.com>
Tue, 26 Apr 2016 17:05:59 +0000 (17:05 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 26 Apr 2016 17:05:59 +0000 (17:05 +0000)
interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/commons/AlivenessMonitorUtils.java

index 98c1a6ff61c05d6653d494c650aec1aa6b4f6e44..12992dc9717a74078e44760d47c47d0ed496c507 100644 (file)
@@ -146,7 +146,7 @@ public class AlivenessMonitorUtils {
         LOG.debug("handling tunnel monitoring updates for interface {}", interfaceName);
         // Restart LLDP monitoring only if it's started already
         List<Long> monitorIds = getMonitorIdForInterface(dataBroker, interfaceName);
-        if (monitorIds != null && monitorIds.size() > 1) {
+        if (monitorIds != null && !monitorIds.isEmpty()) {
                 stopLLDPMonitoring(alivenessMonitorService, dataBroker, interfaceOld);
                 if(ifTunnelNew.isMonitorEnabled()) {
                     startLLDPMonitoring(alivenessMonitorService, dataBroker, interfaceNew);