From 266abe6f184aeb514b47179f8a2ec077ced365fd Mon Sep 17 00:00:00 2001 From: Alissa Bonas Date: Sun, 29 Sep 2013 16:37:49 +0300 Subject: [PATCH] Add curly braces in for loops in DeviceManagerImpl Change-Id: I9802573f086a1715687590c6478e486fee06c09f Signed-off-by: Alissa Bonas --- .../internal/DeviceManagerImpl.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/opendaylight/hosttracker_new/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/DeviceManagerImpl.java b/opendaylight/hosttracker_new/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/DeviceManagerImpl.java index 0390907616..1308d86eec 100755 --- a/opendaylight/hosttracker_new/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/DeviceManagerImpl.java +++ b/opendaylight/hosttracker_new/implementation/src/main/java/org/opendaylight/controller/hosttracker/internal/DeviceManagerImpl.java @@ -2279,10 +2279,12 @@ public class DeviceManagerImpl implements IDeviceService, IEntityClassListener, Device d = di.next(); if (d.isStaticHost()) { deleteDevice(d); - for (IfNewHostNotify notify : newHostNotify) + for (IfNewHostNotify notify : newHostNotify) { notify.notifyHTClientHostRemoved(d.toHostNodeConnector()); - for (IDeviceListener listener : listeners) + } + for (IDeviceListener listener : listeners) { listener.deviceRemoved(d); + } } } //go through inactive entites. @@ -2313,10 +2315,12 @@ public class DeviceManagerImpl implements IDeviceService, IEntityClassListener, if (host.getnodeconnectorNode().equals(node)) { logger.debug("Node: {} is down, remove from Hosts_DB", node); deleteDevice(device); - for (IfNewHostNotify notify : newHostNotify) + for (IfNewHostNotify notify : newHostNotify) { notify.notifyHTClientHostRemoved(host); - for (IDeviceListener listener : listeners) + } + for (IDeviceListener listener : listeners) { listener.deviceRemoved(device); + } } } break; @@ -2357,10 +2361,12 @@ public class DeviceManagerImpl implements IDeviceService, IEntityClassListener, HostNodeConnector host = device.toHostNodeConnector(); if (host != null) { inactiveStaticDevices.remove(nodeConnector); - for (IfNewHostNotify notify : newHostNotify) + for (IfNewHostNotify notify : newHostNotify) { notify.notifyHTClient(host); - for (IDeviceListener listener : listeners) + } + for (IDeviceListener listener : listeners) { listener.deviceAdded(device); + } } else { logger.debug("handleNodeConnectorStatusDown {}", nodeConnector); } @@ -2372,10 +2378,12 @@ public class DeviceManagerImpl implements IDeviceService, IEntityClassListener, HostNodeConnector host = device.toHostNodeConnector(); if (host.getnodeConnector().equals(nodeConnector)) { deleteDevice(device); - for (IfNewHostNotify notify : newHostNotify) + for (IfNewHostNotify notify : newHostNotify) { notify.notifyHTClientHostRemoved(host); - for (IDeviceListener listener : listeners) + } + for (IDeviceListener listener : listeners) { listener.deviceRemoved(device); + } } } -- 2.36.6