X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fhosttracker_new%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fhosttracker%2Finternal%2FDevice.java;fp=opendaylight%2Fhosttracker_new%2Fimplementation%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fhosttracker%2Finternal%2FDevice.java;h=b2180297da3ca1438a522bc345aa491cccbdcc54;hb=60171f91714302d5e3e5dcbd4d08e3cf94cfde6a;hp=fb81cddc964c3887ad30ee030f8600140faea922;hpb=c11dff1f548652d147d25966033a1cd31416afc9;p=controller.git diff --git a/opendaylight/hosttracker_new/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/Device.java b/opendaylight/hosttracker_new/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/Device.java index fb81cddc96..b2180297da 100755 --- a/opendaylight/hosttracker_new/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/Device.java +++ b/opendaylight/hosttracker_new/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/Device.java @@ -181,7 +181,8 @@ public class Device implements IDevice { * @param newEntity * the entity to add. newEntity must be have the same entity * class as device - * @param if positive indicates the index in the entities array were the new + * @param insertionpoint + * if positive indicates the index in the entities array were the new * entity should be inserted. If negative we will compute the correct * insertion point */ @@ -240,10 +241,11 @@ public class Device implements IDevice { TreeSet vals = new TreeSet(); for (Entity e : entities) { - if (e.getVlan() == null) + if (e.getVlan() == null) { vals.add((short) -1); - else + } else { vals.add(e.getVlan()); + } } return vals.toArray(new Short[vals.size()]); } @@ -313,15 +315,16 @@ public class Device implements IDevice { return false; for (AttachmentPoint ap : apList) { - if (ap.getLastSeen() + AttachmentPoint.INACTIVITY_INTERVAL < System - .currentTimeMillis()) - expiredAPs.add(ap); + if (ap.getLastSeen() + AttachmentPoint.INACTIVITY_INTERVAL < System.currentTimeMillis()) { + expiredAPs.add(ap); + } } if (expiredAPs.size() > 0) { apList.removeAll(expiredAPs); return true; - } else + } else { return false; + } } /** @@ -410,7 +413,6 @@ public class Device implements IDevice { * any change to the list of attachment points for the device -- which * indicates a device move. * - * @param sw * @param port * @param lastSeen * @return @@ -525,7 +527,6 @@ public class Device implements IDevice { /** * Delete (sw,port) from the list of list of attachment points and oldAPs. * - * @param sw * @param port * @return */ @@ -703,10 +704,12 @@ public class Device implements IDevice { TreeSet vals = new TreeSet(); for (Entity e : entities) { if (e.getPort().equals(swp.getPort())) { - if (e.getVlan() == null) + if (e.getVlan() == null) { vals.add(VLAN_UNTAGGED); - else + } + else { vals.add(e.getVlan()); + } } } return vals.toArray(new Short[vals.size()]);