X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fhosttracker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fhosttracker%2FHostTracker.java;h=42802d324c295f260ef39103ae310f3594dc3eae;hb=f6fdaa2c3a3542264c4fa0e92e9ca14ed6f26b66;hp=7046e343e726658d37ec1ea9e49006136c4b261c;hpb=4c2ebd7ce9549848b6812731505ccf6308e22938;p=controller.git diff --git a/opendaylight/hosttracker/src/main/java/org/opendaylight/controller/hosttracker/HostTracker.java b/opendaylight/hosttracker/src/main/java/org/opendaylight/controller/hosttracker/HostTracker.java index 7046e343e7..42802d324c 100644 --- a/opendaylight/hosttracker/src/main/java/org/opendaylight/controller/hosttracker/HostTracker.java +++ b/opendaylight/hosttracker/src/main/java/org/opendaylight/controller/hosttracker/HostTracker.java @@ -30,6 +30,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.apache.felix.dm.Component; +import org.apache.taglibs.standard.lang.jstl.DivideOperator; import org.opendaylight.controller.clustering.services.CacheConfigException; import org.opendaylight.controller.clustering.services.CacheExistException; import org.opendaylight.controller.clustering.services.IClusterContainerServices; @@ -201,7 +202,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, logger.debug("Retrieving cache for HostTrackerIH"); inactiveStaticHosts = (ConcurrentMap) this.clusterContainerService .getCache("hostTrackerIH"); - if (hostsDB == null) { + if (inactiveStaticHosts == null) { logger.error("Cache couldn't be retrieved for HostTrackerIH"); } logger.debug("Cache was successfully retrieved for HostTrackerIH"); @@ -955,6 +956,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, } private class ARPRefreshHandler extends TimerTask { + @SuppressWarnings("deprecation") public void run() { if ((clusterContainerService != null) && !clusterContainerService.amICoordinator()) { @@ -1215,7 +1217,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, nc, Short.valueOf(vlan)); } catch (UnknownHostException e) { - e.printStackTrace(); + logger.error("",e); return new Status(StatusCode.BADREQUEST, "Invalid Address"); } } @@ -1227,7 +1229,7 @@ public class HostTracker implements IfIptoHost, IfHostListener, address = InetAddress.getByName(networkAddress); return removeStaticHostReq(address); } catch (UnknownHostException e) { - e.printStackTrace(); + logger.error("",e); return new Status(StatusCode.BADREQUEST, "Invalid Address"); } }