summaryrefslogtreecommitdiff
path: root/jurt
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-28 11:18:57 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-29 22:03:02 +0200
commit9def9b4674b9610004e915635578d26a48d98300 (patch)
tree9c168919a11f01461b04396cfead93985ee8d447 /jurt
parentbaccb18f9ad5258c6efae6b23aa90c96b1a8e211 (diff)
Java5 update - convert Hashtable to HashMap
Change-Id: I59a7448b6c0a840b0f04b765ef9d5272dceb47b3
Diffstat (limited to 'jurt')
-rw-r--r--jurt/com/sun/star/comp/servicemanager/ServiceManager.java20
-rw-r--r--jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java4
2 files changed, 12 insertions, 12 deletions
diff --git a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
index de95d7b93227..643b0cae5dac 100644
--- a/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
+++ b/jurt/com/sun/star/comp/servicemanager/ServiceManager.java
@@ -80,8 +80,8 @@ public class ServiceManager implements XMultiServiceFactory,
};
ArrayList eventListener;
- java.util.Hashtable factoriesByImplNames;
- java.util.Hashtable factoriesByServiceNames; // keys:
+ java.util.HashMap factoriesByImplNames;
+ java.util.HashMap factoriesByServiceNames; // keys:
private com.sun.star.uno.XComponentContext m_xDefaultContext;
@@ -90,8 +90,8 @@ public class ServiceManager implements XMultiServiceFactory,
*/
public ServiceManager() {
eventListener = new ArrayList();
- factoriesByImplNames = new java.util.Hashtable();
- factoriesByServiceNames = new java.util.Hashtable();
+ factoriesByImplNames = new java.util.HashMap();
+ factoriesByServiceNames = new java.util.HashMap();
m_xDefaultContext = null;
}
/**
@@ -99,8 +99,8 @@ public class ServiceManager implements XMultiServiceFactory,
*/
public ServiceManager( XComponentContext xContext ) {
eventListener = new ArrayList();
- factoriesByImplNames = new java.util.Hashtable();
- factoriesByServiceNames = new java.util.Hashtable();
+ factoriesByImplNames = new java.util.HashMap();
+ factoriesByServiceNames = new java.util.HashMap();
m_xDefaultContext = xContext;
}
@@ -341,10 +341,10 @@ public class ServiceManager implements XMultiServiceFactory,
int i = 0;
String[] availableServiceNames = new String[factoriesByServiceNames.size()];
- java.util.Enumeration keys = factoriesByServiceNames.keys();
+ java.util.Iterator keys = factoriesByServiceNames.keySet().iterator();
- while (keys.hasMoreElements())
- availableServiceNames[i++] = (String) keys.nextElement();
+ while (keys.hasNext())
+ availableServiceNames[i++] = (String) keys.next();
return availableServiceNames;
}
@@ -634,7 +634,7 @@ public class ServiceManager implements XMultiServiceFactory,
public XEnumeration createEnumeration()
throws com.sun.star.uno.RuntimeException
{
- return new ServiceEnumerationImpl( factoriesByImplNames.elements() );
+ return new ServiceEnumerationImpl( factoriesByImplNames.values().iterator() );
}
/**
diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java
index 1056d36fc082..9a2ae19184fd 100644
--- a/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java
+++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/TestBridge.java
@@ -19,7 +19,7 @@ package com.sun.star.lib.uno.protocols.urp;
import java.io.IOException;
-import java.util.Hashtable;
+import java.util.HashMap;
import com.sun.star.uno.IBridge;
@@ -30,7 +30,7 @@ import com.sun.star.uno.Type;
class TestBridge implements IBridge {
static public final boolean DEBUG = false;
- Hashtable _hashtable = new Hashtable();
+ HashMap _hashtable = new HashMap();
IEnvironment _source ;//= new com.sun.star.lib.uno.environments.java.java_environment(null);