summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/host-corba
diff options
context:
space:
mode:
authorwjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68>2008-08-18 15:59:08 +0000
committerwjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68>2008-08-18 15:59:08 +0000
commit1ed4ff32332c595ae417e03f59092bda5da119b0 (patch)
treed33ef6b73af659fbeafe52b321d29ee589bd27f4 /java/sca/modules/host-corba
parentb58a361da80d48a7b59cdbe45c08b5fbe73edcd8 (diff)
Some code cleanups
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@686803 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/host-corba')
-rwxr-xr-xjava/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
index 42f45b7a5e..6989b3ad06 100755
--- a/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
+++ b/java/sca/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/SocketUtil.java
@@ -52,13 +52,13 @@ public class SocketUtil {
private Set<String> addressList;
private String host;
private Set<String> nonAddressList;
- private Map threadMap2;
+ private Map<String, CacheThread> threadMap2;
public CacheThread(String host,
Set<InetAddress> currentAddresses,
Set<String> addressList,
Set<String> nonAddressList,
- Map threadMap2) {
+ Map<String, CacheThread> threadMap2) {
super("Caching localhost information");
this.host = host;
this.currentAddresses = currentAddresses;
@@ -69,9 +69,9 @@ public class SocketUtil {
public void run() {
if (currentAddresses != null) {
- Iterator iter2 = currentAddresses.iterator();
+ Iterator<InetAddress> iter2 = currentAddresses.iterator();
while (iter2.hasNext()) {
- InetAddress addr = (InetAddress)iter2.next();
+ InetAddress addr = iter2.next();
String hostname = addr.getHostName();
String hostname2 = addr.getCanonicalHostName();
synchronized (lock) {
@@ -154,7 +154,7 @@ public class SocketUtil {
// get network interfaces
final Set<InetAddress> currentAddresses = new HashSet<InetAddress>();
currentAddresses.add(InetAddress.getLocalHost());
- Enumeration nis = NetworkInterface.getNetworkInterfaces();
+ Enumeration<?> nis = NetworkInterface.getNetworkInterfaces();
while (nis.hasMoreElements()) {
NetworkInterface inter = (NetworkInterface)nis.nextElement();
Enumeration<InetAddress> ias = inter.getInetAddresses();
@@ -173,9 +173,9 @@ public class SocketUtil {
notLocalHostCache = new HashSet<String>();
localHostCache = new HashSet<String>(currentAddresses.size() * 3);
- Iterator iter = currentAddresses.iterator();
+ Iterator<InetAddress> iter = currentAddresses.iterator();
while (iter.hasNext()) {
- InetAddress addr = (InetAddress)iter.next();
+ InetAddress addr = iter.next();
String a = addr.getHostAddress();
if (a != null && !localHostCache.contains(a))
localHostCache.add(a);