diff options
Diffstat (limited to 'test/net/java/sip/communicator/slick/netaddr')
-rw-r--r-- | test/net/java/sip/communicator/slick/netaddr/TestNetworkAddressManagerService.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test/net/java/sip/communicator/slick/netaddr/TestNetworkAddressManagerService.java b/test/net/java/sip/communicator/slick/netaddr/TestNetworkAddressManagerService.java index 8ca6985..4ab0214 100644 --- a/test/net/java/sip/communicator/slick/netaddr/TestNetworkAddressManagerService.java +++ b/test/net/java/sip/communicator/slick/netaddr/TestNetworkAddressManagerService.java @@ -92,15 +92,16 @@ public class TestNetworkAddressManagerService extends TestCase { private static boolean isLocalInterfaceAddress(InetAddress address) { try { - Enumeration intfs = NetworkInterface.getNetworkInterfaces(); + Enumeration<NetworkInterface> intfs + = NetworkInterface.getNetworkInterfaces(); while (intfs.hasMoreElements()) { - NetworkInterface intf = (NetworkInterface) intfs.nextElement(); - Enumeration addrs = intf.getInetAddresses(); + NetworkInterface intf = intfs.nextElement(); + Enumeration<InetAddress> addrs = intf.getInetAddresses(); while (addrs.hasMoreElements()) { try { - InetAddress addr = (InetAddress) addrs.nextElement(); + InetAddress addr = addrs.nextElement(); if(addr.equals(address)) return true; } catch (Exception e) @@ -610,6 +611,7 @@ public class TestNetworkAddressManagerService extends TestCase { return null; } + private void initProperties() { try @@ -622,8 +624,4 @@ public class TestNetworkAddressManagerService extends TestCase { } catch(Exception ex){} } - - - - } |