diff --git a/src/main/java/org/sdnplatform/sync/internal/config/SyncStoreCCProvider.java b/src/main/java/org/sdnplatform/sync/internal/config/SyncStoreCCProvider.java index 0432b8ad986baafe84aa6d20e2b8f8a990889715..c39cc913a1def45ce5a1836b084738f99a0848cc 100644 --- a/src/main/java/org/sdnplatform/sync/internal/config/SyncStoreCCProvider.java +++ b/src/main/java/org/sdnplatform/sync/internal/config/SyncStoreCCProvider.java @@ -240,19 +240,19 @@ public class SyncStoreCCProvider InetAddress bestAddr = null; for (NetworkInterface iface : Collections.list(ifaces)) { - if (iface.isLoopback()) continue; - if (ifaceStr != null) { - if (!ifaceStr.equals(iface.getName())) - continue; - } - Enumeration<InetAddress> addrs = iface.getInetAddresses(); try { + if (iface.isLoopback()) continue; + if (ifaceStr != null) { + if (!ifaceStr.equals(iface.getName())) + continue; + } + Enumeration<InetAddress> addrs = iface.getInetAddresses(); for (InetAddress addr : Collections.list(addrs)) { if (bestAddr == null || (!addr.isLinkLocalAddress() && bestAddr.isLinkLocalAddress()) || - (addr instanceof Inet6Address && - bestAddr instanceof Inet4Address)) { + (addr instanceof Inet6Address && + bestAddr instanceof Inet4Address)) { bestAddr = addr; } }