summaryrefslogtreecommitdiff
path: root/java/test
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2008-01-28 13:44:56 -0800
committerMark Spruiell <mes@zeroc.com>2008-01-28 13:44:56 -0800
commit78a3798d14b42c48dc1c4ce8fda56571eb7536f3 (patch)
tree578f44b66d71977298eb68eee4b1ea9a720cfcc2 /java/test
parentremoving VC71 (diff)
downloadice-78a3798d14b42c48dc1c4ce8fda56571eb7536f3.tar.bz2
ice-78a3798d14b42c48dc1c4ce8fda56571eb7536f3.tar.xz
ice-78a3798d14b42c48dc1c4ce8fda56571eb7536f3.zip
bug 1388 + Java5 fixes for bug 2551
Diffstat (limited to 'java/test')
-rw-r--r--java/test/Freeze/complex/build.xml4
-rw-r--r--java/test/Freeze/dbmap/build.xml4
-rw-r--r--java/test/Freeze/evictor/build.xml4
-rw-r--r--java/test/Freeze/oldevictor/build.xml4
-rw-r--r--java/test/Glacier2/attack/AttackClient.java4
-rw-r--r--java/test/Glacier2/attack/build.xml4
-rw-r--r--java/test/Glacier2/router/CallbackClient.java14
-rw-r--r--java/test/Glacier2/router/build.xml4
-rw-r--r--java/test/Ice/adapterDeactivation/build.xml4
-rw-r--r--java/test/Ice/background/AllTests.java14
-rw-r--r--java/test/Ice/background/BackgroundControllerI.java2
-rw-r--r--java/test/Ice/background/EndpointI.java46
-rw-r--r--java/test/Ice/background/Server.java3
-rw-r--r--java/test/Ice/background/build.xml4
-rw-r--r--java/test/Ice/binding/AllTests.java167
-rw-r--r--java/test/Ice/binding/build.xml4
-rw-r--r--java/test/Ice/checksum/client/AllTests.java12
-rw-r--r--java/test/Ice/checksum/client/build.xml4
-rw-r--r--java/test/Ice/checksum/server/ChecksumI.java2
-rw-r--r--java/test/Ice/checksum/server/build.xml4
-rw-r--r--java/test/Ice/custom/build.xml4
-rw-r--r--java/test/Ice/exceptions/build.xml4
-rw-r--r--java/test/Ice/exceptionsAMD/build.xml4
-rw-r--r--java/test/Ice/facets/AllTests.java2
-rw-r--r--java/test/Ice/facets/build.xml4
-rw-r--r--java/test/Ice/faultTolerance/Client.java6
-rw-r--r--java/test/Ice/faultTolerance/build.xml4
-rw-r--r--java/test/Ice/hold/build.xml4
-rw-r--r--java/test/Ice/inheritance/build.xml4
-rw-r--r--java/test/Ice/interceptor/build.xml4
-rw-r--r--java/test/Ice/location/ServerLocatorRegistry.java9
-rw-r--r--java/test/Ice/location/ServerManagerI.java12
-rw-r--r--java/test/Ice/location/build.xml4
-rw-r--r--java/test/Ice/objects/build.xml4
-rw-r--r--java/test/Ice/operations/MyDerivedClassI.java32
-rw-r--r--java/test/Ice/operations/Twoways.java140
-rw-r--r--java/test/Ice/operations/TwowaysAMI.java232
-rw-r--r--java/test/Ice/operations/build.xml4
-rw-r--r--java/test/Ice/operationsAMD/MyDerivedClassI.java30
-rw-r--r--java/test/Ice/operationsAMD/build.xml4
-rw-r--r--java/test/Ice/package/build.xml4
-rw-r--r--java/test/Ice/proxy/AllTests.java10
-rw-r--r--java/test/Ice/proxy/MyDerivedClassI.java4
-rw-r--r--java/test/Ice/proxy/build.xml4
-rw-r--r--java/test/Ice/proxyAMD/MyDerivedClassI.java2
-rw-r--r--java/test/Ice/proxyAMD/build.xml4
-rw-r--r--java/test/Ice/retry/build.xml4
-rw-r--r--java/test/Ice/servantLocator/build.xml4
-rw-r--r--java/test/Ice/servantLocatorAMD/build.xml4
-rw-r--r--java/test/Ice/slicing/exceptions/build.xml8
-rw-r--r--java/test/Ice/slicing/exceptionsAMD/build.xml4
-rw-r--r--java/test/Ice/slicing/objects/build.xml8
-rw-r--r--java/test/Ice/slicing/objects/csrc/AllTests.java32
-rw-r--r--java/test/Ice/slicing/objects/ssrc/TestI.java16
-rw-r--r--java/test/Ice/slicing/objectsAMD/TestI.java14
-rw-r--r--java/test/Ice/slicing/objectsAMD/build.xml4
-rw-r--r--java/test/Ice/stream/Client.java2
-rw-r--r--java/test/Ice/stream/build.xml4
-rw-r--r--java/test/Ice/threads/AllTests.java14
-rw-r--r--java/test/Ice/threads/ThreadHookI.java6
-rw-r--r--java/test/Ice/threads/build.xml4
-rw-r--r--java/test/Ice/timeout/build.xml4
-rw-r--r--java/test/Ice/translator/build.xml4
-rw-r--r--java/test/IceBox/configuration/build.xml4
-rw-r--r--java/test/IceGrid/simple/build.xml4
-rw-r--r--java/test/IceSSL/configuration/AllTests.java56
-rw-r--r--java/test/IceSSL/configuration/CertificateVerifierI.java10
-rw-r--r--java/test/IceSSL/configuration/ServerFactoryI.java12
-rw-r--r--java/test/IceSSL/configuration/build.xml4
-rw-r--r--java/test/IceUtil/inputUtil/build.xml4
-rw-r--r--java/test/Slice/keyword/build.xml4
71 files changed, 544 insertions, 537 deletions
diff --git a/java/test/Freeze/complex/build.xml b/java/test/Freeze/complex/build.xml
index ef79f6750e5..ec35e232601 100644
--- a/java/test/Freeze/complex/build.xml
+++ b/java/test/Freeze/complex/build.xml
@@ -35,11 +35,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Freeze/dbmap/build.xml b/java/test/Freeze/dbmap/build.xml
index d365b437926..53ab4b0a586 100644
--- a/java/test/Freeze/dbmap/build.xml
+++ b/java/test/Freeze/dbmap/build.xml
@@ -57,11 +57,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Freeze/evictor/build.xml b/java/test/Freeze/evictor/build.xml
index 82156dba7a8..6c6bff67ded 100644
--- a/java/test/Freeze/evictor/build.xml
+++ b/java/test/Freeze/evictor/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}:${class.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Freeze/oldevictor/build.xml b/java/test/Freeze/oldevictor/build.xml
index e3539b1d9b6..4f7ef3be323 100644
--- a/java/test/Freeze/oldevictor/build.xml
+++ b/java/test/Freeze/oldevictor/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}:${class.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Glacier2/attack/AttackClient.java b/java/test/Glacier2/attack/AttackClient.java
index 8a926603292..eacaf831ffc 100644
--- a/java/test/Glacier2/attack/AttackClient.java
+++ b/java/test/Glacier2/attack/AttackClient.java
@@ -44,7 +44,7 @@ class AttackClient extends Ice.Application
BackendPrx backend = BackendPrxHelper.uncheckedCast(backendBase);
backend.ice_ping();
- java.util.HashMap backends = new java.util.HashMap();
+ java.util.Map<BackendPrx, BackendPrx> backends = new java.util.HashMap<BackendPrx, BackendPrx>();
java.util.Random rand = new java.util.Random();
String msg = "";
@@ -85,7 +85,7 @@ class AttackClient extends Ice.Application
}
else
{
- backend = (BackendPrx)backends.get(newBackend);
+ backend = backends.get(newBackend);
}
backend.ice_ping();
diff --git a/java/test/Glacier2/attack/build.xml b/java/test/Glacier2/attack/build.xml
index 8a09f706598..d6104d78fd1 100644
--- a/java/test/Glacier2/attack/build.xml
+++ b/java/test/Glacier2/attack/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Glacier2/router/CallbackClient.java b/java/test/Glacier2/router/CallbackClient.java
index 6a8b5ef0156..723eabd0c10 100644
--- a/java/test/Glacier2/router/CallbackClient.java
+++ b/java/test/Glacier2/router/CallbackClient.java
@@ -221,7 +221,7 @@ class CallbackClient extends Ice.Application
System.out.flush();
CallbackPrx oneway = CallbackPrxHelper.uncheckedCast(twoway.ice_oneway());
CallbackReceiverPrx onewayR = CallbackReceiverPrxHelper.uncheckedCast(twowayR.ice_oneway());
- java.util.Map context = new java.util.HashMap();
+ java.util.Map<String, String> context = new java.util.HashMap<String, String>();
context.put("_fwd", "o");
oneway.initiateCallback(onewayR, context);
test(callbackReceiverImpl.callbackOK());
@@ -231,7 +231,7 @@ class CallbackClient extends Ice.Application
{
System.out.print("testing twoway callback... ");
System.out.flush();
- java.util.Map context = new java.util.HashMap();
+ java.util.Map<String, String> context = new java.util.HashMap<String, String>();
context.put("_fwd", "t");
twoway.initiateCallback(twowayR, context);
test(callbackReceiverImpl.callbackOK());
@@ -241,7 +241,7 @@ class CallbackClient extends Ice.Application
{
System.out.print("ditto, but with user exception... ");
System.out.flush();
- java.util.Map context = new java.util.HashMap();
+ java.util.Map<String, String> context = new java.util.HashMap<String, String>();
context.put("_fwd", "t");
try
{
@@ -260,7 +260,7 @@ class CallbackClient extends Ice.Application
{
System.out.print("trying twoway callback with fake category... ");
System.out.flush();
- java.util.Map context = new java.util.HashMap();
+ java.util.Map<String, String> context = new java.util.HashMap<String, String>();
context.put("_fwd", "t");
try
{
@@ -276,7 +276,7 @@ class CallbackClient extends Ice.Application
{
System.out.print("testing whether other allowed category is accepted... ");
System.out.flush();
- java.util.Map context = new java.util.HashMap();
+ java.util.Map<String, String> context = new java.util.HashMap<String, String>();
context.put("_fwd", "t");
CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
twoway.ice_identity(communicator().stringToIdentity("c2/callback")));
@@ -288,7 +288,7 @@ class CallbackClient extends Ice.Application
{
System.out.print("testing whether disallowed category gets rejected... ");
System.out.flush();
- java.util.Map context = new java.util.HashMap();
+ java.util.Map<String, String> context = new java.util.HashMap<String, String>();
context.put("_fwd", "t");
try
{
@@ -306,7 +306,7 @@ class CallbackClient extends Ice.Application
{
System.out.print("testing whether user-id as category is accepted... ");
System.out.flush();
- java.util.Map context = new java.util.HashMap();
+ java.util.Map<String, String> context = new java.util.HashMap<String, String>();
context.put("_fwd", "t");
CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
twoway.ice_identity(communicator().stringToIdentity("_userid/callback")));
diff --git a/java/test/Glacier2/router/build.xml b/java/test/Glacier2/router/build.xml
index 8add23bff76..8644fecbbf7 100644
--- a/java/test/Glacier2/router/build.xml
+++ b/java/test/Glacier2/router/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/adapterDeactivation/build.xml b/java/test/Ice/adapterDeactivation/build.xml
index 43d335b030d..be268e6ea34 100644
--- a/java/test/Ice/adapterDeactivation/build.xml
+++ b/java/test/Ice/adapterDeactivation/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/background/AllTests.java b/java/test/Ice/background/AllTests.java
index f3cc846f87e..06c04b43b7e 100644
--- a/java/test/Ice/background/AllTests.java
+++ b/java/test/Ice/background/AllTests.java
@@ -111,7 +111,7 @@ public class AllTests
}
public synchronized void
- destroy()
+ _destroy() // Thread.destroy is deprecated
{
_destroyed = true;
}
@@ -407,8 +407,8 @@ public class AllTests
}
}
- thread1.destroy();
- thread2.destroy();
+ thread1._destroy();
+ thread2._destroy();
try
{
@@ -642,8 +642,8 @@ public class AllTests
}
}
- thread1.destroy();
- thread2.destroy();
+ thread1._destroy();
+ thread2._destroy();
try
{
@@ -1162,8 +1162,8 @@ public class AllTests
background.ice_getCachedConnection().close(true);
}
- thread1.destroy();
- thread2.destroy();
+ thread1._destroy();
+ thread2._destroy();
try
{
diff --git a/java/test/Ice/background/BackgroundControllerI.java b/java/test/Ice/background/BackgroundControllerI.java
index 890b47de122..828ef9cf47e 100644
--- a/java/test/Ice/background/BackgroundControllerI.java
+++ b/java/test/Ice/background/BackgroundControllerI.java
@@ -112,6 +112,6 @@ class BackgroundControllerI extends _BackgroundControllerDisp
}
final private Ice.ObjectAdapter _adapter;
- final private java.util.HashSet _pausedCalls = new java.util.HashSet();
+ final private java.util.Set<String> _pausedCalls = new java.util.HashSet<String>();
final private Configuration _configuration;
}
diff --git a/java/test/Ice/background/EndpointI.java b/java/test/Ice/background/EndpointI.java
index 52b8e68b6c1..4286c0d9365 100644
--- a/java/test/Ice/background/EndpointI.java
+++ b/java/test/Ice/background/EndpointI.java
@@ -182,15 +182,15 @@ final class EndpointI extends IceInternal.EndpointI
// Return connectors for this endpoint, or empty list if no connector
// is available.
//
- public java.util.List
+ public java.util.List<IceInternal.Connector>
connectors()
{
_configuration.checkConnectorsException();
- java.util.ArrayList connectors = new java.util.ArrayList();
- java.util.Iterator p = _endpoint.connectors().iterator();
+ java.util.List<IceInternal.Connector> connectors = new java.util.ArrayList<IceInternal.Connector>();
+ java.util.Iterator<IceInternal.Connector> p = _endpoint.connectors().iterator();
while(p.hasNext())
{
- connectors.add(new Connector((IceInternal.Connector)p.next()));
+ connectors.add(new Connector(p.next()));
}
return connectors;
}
@@ -201,13 +201,13 @@ final class EndpointI extends IceInternal.EndpointI
class Callback implements IceInternal.EndpointI_connectors
{
public void
- connectors(java.util.List cons)
+ connectors(java.util.List<IceInternal.Connector> cons)
{
- java.util.ArrayList connectors = new java.util.ArrayList();
- java.util.Iterator p = cons.iterator();
+ java.util.List<IceInternal.Connector> connectors = new java.util.ArrayList<IceInternal.Connector>();
+ java.util.Iterator<IceInternal.Connector> p = cons.iterator();
while(p.hasNext())
{
- connectors.add(new Connector((IceInternal.Connector)p.next()));
+ connectors.add(new Connector(p.next()));
}
cb.connectors(connectors);
}
@@ -238,14 +238,14 @@ final class EndpointI extends IceInternal.EndpointI
return p;
}
- public java.util.List
+ public java.util.List<IceInternal.EndpointI>
expand()
{
- java.util.ArrayList endps = new java.util.ArrayList();
- java.util.Iterator iter = _endpoint.expand().iterator();
+ java.util.List<IceInternal.EndpointI> endps = new java.util.ArrayList<IceInternal.EndpointI>();
+ java.util.Iterator<IceInternal.EndpointI> iter = _endpoint.expand().iterator();
while(iter.hasNext())
{
- IceInternal.EndpointI endpt = (IceInternal.EndpointI)iter.next();
+ IceInternal.EndpointI endpt = iter.next();
endps.add(endpt == _endpoint ? this : new EndpointI(endpt));
}
return endps;
@@ -278,11 +278,19 @@ final class EndpointI extends IceInternal.EndpointI
public boolean
equals(java.lang.Object obj)
{
- return compareTo(obj) == 0;
+ try
+ {
+ return compareTo((IceInternal.EndpointI)obj) == 0;
+ }
+ catch(ClassCastException ee)
+ {
+ assert(false);
+ return false;
+ }
}
public int
- compareTo(java.lang.Object obj) // From java.lang.Comparable
+ compareTo(IceInternal.EndpointI obj) // From java.lang.Comparable
{
EndpointI p = null;
@@ -292,15 +300,7 @@ final class EndpointI extends IceInternal.EndpointI
}
catch(ClassCastException ex)
{
- try
- {
- IceInternal.EndpointI e = (IceInternal.EndpointI)obj;
- return type() < e.type() ? -1 : 1;
- }
- catch(ClassCastException ee)
- {
- assert(false);
- }
+ return type() < obj.type() ? -1 : 1;
}
if(this == p)
diff --git a/java/test/Ice/background/Server.java b/java/test/Ice/background/Server.java
index abd24ec7f4e..23f6a3879d0 100644
--- a/java/test/Ice/background/Server.java
+++ b/java/test/Ice/background/Server.java
@@ -58,6 +58,9 @@ public class Server
return null;
}
+ /**
+ * @deprecated addProxy() is deprecated, use addProxies() instead.
+ **/
public void
addProxy(Ice.ObjectPrx proxy, Ice.Current current)
{
diff --git a/java/test/Ice/background/build.xml b/java/test/Ice/background/build.xml
index 0aaa86b7853..88f0f6066dd 100644
--- a/java/test/Ice/background/build.xml
+++ b/java/test/Ice/background/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/binding/AllTests.java b/java/test/Ice/binding/AllTests.java
index 66733793bc9..9ff8feb7644 100644
--- a/java/test/Ice/binding/AllTests.java
+++ b/java/test/Ice/binding/AllTests.java
@@ -22,7 +22,7 @@ public class AllTests
static class GetAdapterNameCB extends AMI_TestIntf_getAdapterName
{
- synchronized public void
+ synchronized public void
ice_response(String adapterName)
{
_name = adapterName;
@@ -56,9 +56,9 @@ public class AllTests
}
return _name;
}
-
+
private String _name = null;
- };
+ }
private static String
getAdapterNameWithAMI(TestIntfPrx test)
@@ -69,14 +69,14 @@ public class AllTests
}
private static TestIntfPrx
- createTestIntfPrx(java.util.List adapters)
+ createTestIntfPrx(java.util.List<RemoteObjectAdapterPrx> adapters)
{
- java.util.List endpoints = new java.util.ArrayList();
+ java.util.List<Ice.Endpoint> endpoints = new java.util.ArrayList<Ice.Endpoint>();
TestIntfPrx test = null;
- java.util.Iterator p = adapters.iterator();
+ java.util.Iterator<RemoteObjectAdapterPrx> p = adapters.iterator();
while(p.hasNext())
{
- test = ((RemoteObjectAdapterPrx)p.next()).getTestIntf();
+ test = p.next().getTestIntf();
Ice.Endpoint[] edpts = test.ice_getEndpoints();
endpoints.addAll(java.util.Arrays.asList(edpts));
}
@@ -85,12 +85,12 @@ public class AllTests
}
private static void
- deactivate(RemoteCommunicatorPrx communicator, java.util.List adapters)
+ deactivate(RemoteCommunicatorPrx communicator, java.util.List<RemoteObjectAdapterPrx> adapters)
{
- java.util.Iterator p = adapters.iterator();
+ java.util.Iterator<RemoteObjectAdapterPrx> p = adapters.iterator();
while(p.hasNext())
{
- communicator.deactivateObjectAdapter((RemoteObjectAdapterPrx)p.next());
+ communicator.deactivateObjectAdapter(p.next());
}
}
@@ -111,9 +111,9 @@ public class AllTests
test1.ice_ping();
test2.ice_ping();
-
+
com.deactivateObjectAdapter(adapter);
-
+
TestIntfPrx test3 = TestIntfPrxHelper.uncheckedCast(test1);
test(test3.ice_getConnection() == test1.ice_getConnection());
test(test3.ice_getConnection() == test2.ice_getConnection());
@@ -132,7 +132,7 @@ public class AllTests
System.out.print("testing binding with multiple endpoints... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("Adapter11", "default"));
adapters.add(com.createObjectAdapter("Adapter12", "default"));
adapters.add(com.createObjectAdapter("Adapter13", "default"));
@@ -141,13 +141,14 @@ public class AllTests
// Ensure that when a connection is opened it's reused for new
// proxies and that all endpoints are eventually tried.
//
- java.util.Set names = new java.util.HashSet();
+ java.util.Set<String> names = new java.util.HashSet<String>();
names.add("Adapter11");
names.add("Adapter12");
names.add("Adapter13");
while(!names.isEmpty())
{
- java.util.List adpts = new java.util.ArrayList(adapters);
+ java.util.List<RemoteObjectAdapterPrx> adpts =
+ new java.util.ArrayList<RemoteObjectAdapterPrx>(adapters);
TestIntfPrx test1 = createTestIntfPrx(adpts);
java.util.Collections.shuffle(adpts);
@@ -157,7 +158,7 @@ public class AllTests
test(test1.ice_getConnection() == test2.ice_getConnection());
test(test2.ice_getConnection() == test3.ice_getConnection());
-
+
names.remove(test1.getAdapterName());
test1.ice_getConnection().close(false);
}
@@ -167,12 +168,12 @@ public class AllTests
// always send the request over the same connection.)
//
{
- java.util.Iterator p = adapters.iterator();
+ java.util.Iterator<RemoteObjectAdapterPrx> p = adapters.iterator();
while(p.hasNext())
{
- ((RemoteObjectAdapterPrx)p.next()).getTestIntf().ice_ping();
+ p.next().getTestIntf().ice_ping();
}
-
+
TestIntfPrx test = createTestIntfPrx(adapters);
String name = test.getAdapterName();
final int nRetry = 10;
@@ -183,39 +184,40 @@ public class AllTests
p = adapters.iterator();
while(p.hasNext())
{
- ((RemoteObjectAdapterPrx)p.next()).getTestIntf().ice_getConnection().close(false);
+ p.next().getTestIntf().ice_getConnection().close(false);
}
- }
+ }
//
// Deactivate an adapter and ensure that we can still
// establish the connection to the remaining adapters.
//
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(0));
+ com.deactivateObjectAdapter(adapters.get(0));
names.add("Adapter12");
names.add("Adapter13");
while(!names.isEmpty())
{
- java.util.List adpts = new java.util.ArrayList(adapters);
+ java.util.List<RemoteObjectAdapterPrx> adpts =
+ new java.util.ArrayList<RemoteObjectAdapterPrx>(adapters);
TestIntfPrx test1 = createTestIntfPrx(adpts);
java.util.Collections.shuffle(adpts);
TestIntfPrx test2 = createTestIntfPrx(adpts);
java.util.Collections.shuffle(adpts);
TestIntfPrx test3 = createTestIntfPrx(adpts);
-
+
test(test1.ice_getConnection() == test2.ice_getConnection());
test(test2.ice_getConnection() == test3.ice_getConnection());
names.remove(test1.getAdapterName());
test1.ice_getConnection().close(false);
}
-
+
//
// Deactivate an adapter and ensure that we can still
// establish the connection to the remaining adapter.
//
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(2));
+ com.deactivateObjectAdapter(adapters.get(2));
TestIntfPrx test = createTestIntfPrx(adapters);
test(test.getAdapterName().equals("Adapter12"));
@@ -226,7 +228,7 @@ public class AllTests
System.out.print("testing binding with multiple endpoints and AMI... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("AdapterAMI11", "default"));
adapters.add(com.createObjectAdapter("AdapterAMI12", "default"));
adapters.add(com.createObjectAdapter("AdapterAMI13", "default"));
@@ -235,13 +237,14 @@ public class AllTests
// Ensure that when a connection is opened it's reused for new
// proxies and that all endpoints are eventually tried.
//
- java.util.Set names = new java.util.HashSet();
+ java.util.Set<String> names = new java.util.HashSet<String>();
names.add("AdapterAMI11");
names.add("AdapterAMI12");
names.add("AdapterAMI13");
while(!names.isEmpty())
{
- java.util.List adpts = new java.util.ArrayList(adapters);
+ java.util.List<RemoteObjectAdapterPrx> adpts =
+ new java.util.ArrayList<RemoteObjectAdapterPrx>(adapters);
TestIntfPrx test1 = createTestIntfPrx(adpts);
java.util.Collections.shuffle(adpts);
@@ -251,7 +254,7 @@ public class AllTests
test(test1.ice_getConnection() == test2.ice_getConnection());
test(test2.ice_getConnection() == test3.ice_getConnection());
-
+
names.remove(getAdapterNameWithAMI(test1));
test1.ice_getConnection().close(false);
}
@@ -261,12 +264,12 @@ public class AllTests
// always send the request over the same connection.)
//
{
- java.util.Iterator p = adapters.iterator();
+ java.util.Iterator<RemoteObjectAdapterPrx> p = adapters.iterator();
while(p.hasNext())
{
- ((RemoteObjectAdapterPrx)p.next()).getTestIntf().ice_ping();
+ p.next().getTestIntf().ice_ping();
}
-
+
TestIntfPrx test = createTestIntfPrx(adapters);
String name = getAdapterNameWithAMI(test);
final int nRetry = 10;
@@ -277,39 +280,40 @@ public class AllTests
p = adapters.iterator();
while(p.hasNext())
{
- ((RemoteObjectAdapterPrx)p.next()).getTestIntf().ice_getConnection().close(false);
+ p.next().getTestIntf().ice_getConnection().close(false);
}
- }
+ }
//
// Deactivate an adapter and ensure that we can still
// establish the connection to the remaining adapters.
//
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(0));
+ com.deactivateObjectAdapter(adapters.get(0));
names.add("AdapterAMI12");
names.add("AdapterAMI13");
while(!names.isEmpty())
{
- java.util.List adpts = new java.util.ArrayList(adapters);
+ java.util.List<RemoteObjectAdapterPrx> adpts =
+ new java.util.ArrayList<RemoteObjectAdapterPrx>(adapters);
TestIntfPrx test1 = createTestIntfPrx(adpts);
java.util.Collections.shuffle(adpts);
TestIntfPrx test2 = createTestIntfPrx(adpts);
java.util.Collections.shuffle(adpts);
TestIntfPrx test3 = createTestIntfPrx(adpts);
-
+
test(test1.ice_getConnection() == test2.ice_getConnection());
test(test2.ice_getConnection() == test3.ice_getConnection());
names.remove(getAdapterNameWithAMI(test1));
test1.ice_getConnection().close(false);
}
-
+
//
// Deactivate an adapter and ensure that we can still
// establish the connection to the remaining adapter.
//
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(2));
+ com.deactivateObjectAdapter(adapters.get(2));
TestIntfPrx test = createTestIntfPrx(adapters);
test(getAdapterNameWithAMI(test).equals("AdapterAMI12"));
@@ -320,7 +324,7 @@ public class AllTests
System.out.print("testing random endpoint selection... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("Adapter21", "default"));
adapters.add(com.createObjectAdapter("Adapter22", "default"));
adapters.add(com.createObjectAdapter("Adapter23", "default"));
@@ -328,7 +332,7 @@ public class AllTests
TestIntfPrx test = createTestIntfPrx(adapters);
test(test.ice_getEndpointSelection() == Ice.EndpointSelectionType.Random);
- java.util.Set names = new java.util.HashSet();
+ java.util.Set<String> names = new java.util.HashSet<String>();
names.add("Adapter21");
names.add("Adapter22");
names.add("Adapter23");
@@ -357,7 +361,7 @@ public class AllTests
System.out.print("testing ordered endpoint selection... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("Adapter31", "default"));
adapters.add(com.createObjectAdapter("Adapter32", "default"));
adapters.add(com.createObjectAdapter("Adapter33", "default"));
@@ -374,14 +378,14 @@ public class AllTests
//
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter31"); i++);
test(i == nRetry);
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(0));
+ com.deactivateObjectAdapter(adapters.get(0));
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter32"); i++);
test(i == nRetry);
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(1));
+ com.deactivateObjectAdapter(adapters.get(1));
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter33"); i++);
test(i == nRetry);
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(2));
-
+ com.deactivateObjectAdapter(adapters.get(2));
+
try
{
test.getAdapterName();
@@ -397,7 +401,7 @@ public class AllTests
//
// Now, re-activate the adapters with the same endpoints in the opposite
// order.
- //
+ //
adapters.add(com.createObjectAdapter("Adapter36", endpoints[2].toString()));
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter36"); i++);
test(i == nRetry);
@@ -426,9 +430,9 @@ public class AllTests
test(test1.ice_getConnection() == test2.ice_getConnection());
test1.ice_ping();
-
+
com.deactivateObjectAdapter(adapter);
-
+
TestIntfPrx test3 = TestIntfPrxHelper.uncheckedCast(test1);
try
{
@@ -444,7 +448,7 @@ public class AllTests
System.out.print("testing per request binding with multiple endpoints... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("Adapter51", "default"));
adapters.add(com.createObjectAdapter("Adapter52", "default"));
adapters.add(com.createObjectAdapter("Adapter53", "default"));
@@ -452,7 +456,7 @@ public class AllTests
TestIntfPrx test = TestIntfPrxHelper.uncheckedCast(createTestIntfPrx(adapters).ice_connectionCached(false));
test(!test.ice_isConnectionCached());
- java.util.Set names = new java.util.HashSet();
+ java.util.Set<String> names = new java.util.HashSet<String>();
names.add("Adapter51");
names.add("Adapter52");
names.add("Adapter53");
@@ -461,7 +465,7 @@ public class AllTests
names.remove(test.getAdapterName());
}
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(0));
+ com.deactivateObjectAdapter(adapters.get(0));
names.add("Adapter52");
names.add("Adapter53");
@@ -470,11 +474,10 @@ public class AllTests
names.remove(test.getAdapterName());
}
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(2));
-
+ com.deactivateObjectAdapter(adapters.get(2));
test(test.getAdapterName().equals("Adapter52"));
-
+
deactivate(com, adapters);
}
System.out.println("ok");
@@ -482,7 +485,7 @@ public class AllTests
System.out.print("testing per request binding with multiple endpoints and AMI... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("AdapterAMI51", "default"));
adapters.add(com.createObjectAdapter("AdapterAMI52", "default"));
adapters.add(com.createObjectAdapter("AdapterAMI53", "default"));
@@ -490,7 +493,7 @@ public class AllTests
TestIntfPrx test = TestIntfPrxHelper.uncheckedCast(createTestIntfPrx(adapters).ice_connectionCached(false));
test(!test.ice_isConnectionCached());
- java.util.Set names = new java.util.HashSet();
+ java.util.Set<String> names = new java.util.HashSet<String>();
names.add("AdapterAMI51");
names.add("AdapterAMI52");
names.add("AdapterAMI53");
@@ -499,7 +502,7 @@ public class AllTests
names.remove(getAdapterNameWithAMI(test));
}
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(0));
+ com.deactivateObjectAdapter(adapters.get(0));
names.add("AdapterAMI52");
names.add("AdapterAMI53");
@@ -508,11 +511,10 @@ public class AllTests
names.remove(getAdapterNameWithAMI(test));
}
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(2));
-
+ com.deactivateObjectAdapter(adapters.get(2));
test(getAdapterNameWithAMI(test).equals("AdapterAMI52"));
-
+
deactivate(com, adapters);
}
System.out.println("ok");
@@ -520,7 +522,7 @@ public class AllTests
System.out.print("testing per request binding and ordered endpoint selection... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("Adapter61", "default"));
adapters.add(com.createObjectAdapter("Adapter62", "default"));
adapters.add(com.createObjectAdapter("Adapter63", "default"));
@@ -539,14 +541,14 @@ public class AllTests
//
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter61"); i++);
test(i == nRetry);
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(0));
+ com.deactivateObjectAdapter(adapters.get(0));
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter62"); i++);
test(i == nRetry);
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(1));
+ com.deactivateObjectAdapter(adapters.get(1));
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter63"); i++);
test(i == nRetry);
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(2));
-
+ com.deactivateObjectAdapter(adapters.get(2));
+
try
{
test.getAdapterName();
@@ -562,7 +564,7 @@ public class AllTests
//
// Now, re-activate the adapters with the same endpoints in the opposite
// order.
- //
+ //
adapters.add(com.createObjectAdapter("Adapter66", endpoints[2].toString()));
for(i = 0; i < nRetry && test.getAdapterName().equals("Adapter66"); i++);
test(i == nRetry);
@@ -580,7 +582,7 @@ public class AllTests
System.out.print("testing per request binding and ordered endpoint selection and AMI... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("AdapterAMI61", "default"));
adapters.add(com.createObjectAdapter("AdapterAMI62", "default"));
adapters.add(com.createObjectAdapter("AdapterAMI63", "default"));
@@ -599,14 +601,14 @@ public class AllTests
//
for(i = 0; i < nRetry && getAdapterNameWithAMI(test).equals("AdapterAMI61"); i++);
test(i == nRetry);
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(0));
+ com.deactivateObjectAdapter(adapters.get(0));
for(i = 0; i < nRetry && getAdapterNameWithAMI(test).equals("AdapterAMI62"); i++);
test(i == nRetry);
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(1));
+ com.deactivateObjectAdapter(adapters.get(1));
for(i = 0; i < nRetry && getAdapterNameWithAMI(test).equals("AdapterAMI63"); i++);
test(i == nRetry);
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(2));
-
+ com.deactivateObjectAdapter(adapters.get(2));
+
try
{
test.getAdapterName();
@@ -622,7 +624,7 @@ public class AllTests
//
// Now, re-activate the adapters with the same endpoints in the opposite
// order.
- //
+ //
adapters.add(com.createObjectAdapter("AdapterAMI66", endpoints[2].toString()));
for(i = 0; i < nRetry && getAdapterNameWithAMI(test).equals("AdapterAMI66"); i++);
test(i == nRetry);
@@ -640,13 +642,13 @@ public class AllTests
System.out.print("testing endpoint mode filtering... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("Adapter71", "default"));
adapters.add(com.createObjectAdapter("Adapter72", "udp"));
TestIntfPrx test = createTestIntfPrx(adapters);
test(test.getAdapterName().equals("Adapter71"));
-
+
TestIntfPrx testUDP = TestIntfPrxHelper.uncheckedCast(test.ice_datagram());
test(test.ice_getConnection() != testUDP.ice_getConnection());
try
@@ -664,10 +666,10 @@ public class AllTests
System.out.print("testing unsecure vs. secure endpoints... ");
System.out.flush();
{
- java.util.List adapters = new java.util.ArrayList();
+ java.util.List<RemoteObjectAdapterPrx> adapters = new java.util.ArrayList<RemoteObjectAdapterPrx>();
adapters.add(com.createObjectAdapter("Adapter81", "ssl"));
adapters.add(com.createObjectAdapter("Adapter82", "tcp"));
-
+
TestIntfPrx test = createTestIntfPrx(adapters);
int i;
for(i = 0; i < 5; i++)
@@ -675,7 +677,7 @@ public class AllTests
test(test.getAdapterName().equals("Adapter82"));
test.ice_getConnection().close(false);
}
-
+
TestIntfPrx testSecure = TestIntfPrxHelper.uncheckedCast(test.ice_secure(true));
test(testSecure.ice_isSecure());
testSecure = TestIntfPrxHelper.uncheckedCast(test.ice_secure(false));
@@ -684,8 +686,8 @@ public class AllTests
test(testSecure.ice_isSecure());
test(test.ice_getConnection() != testSecure.ice_getConnection());
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(1));
-
+ com.deactivateObjectAdapter(adapters.get(1));
+
for(i = 0; i < 5; i++)
{
test(test.getAdapterName().equals("Adapter81"));
@@ -700,7 +702,7 @@ public class AllTests
test.ice_getConnection().close(false);
}
- com.deactivateObjectAdapter((RemoteObjectAdapterPrx)adapters.get(0));
+ com.deactivateObjectAdapter(adapters.get(0));
try
{
testSecure.ice_ping();
@@ -716,6 +718,5 @@ public class AllTests
}
com.shutdown();
-
}
}
diff --git a/java/test/Ice/binding/build.xml b/java/test/Ice/binding/build.xml
index 3fb60511b70..003eeec105d 100644
--- a/java/test/Ice/binding/build.xml
+++ b/java/test/Ice/binding/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/checksum/client/AllTests.java b/java/test/Ice/checksum/client/AllTests.java
index 68ddcc31a36..a3eba83c210 100644
--- a/java/test/Ice/checksum/client/AllTests.java
+++ b/java/test/Ice/checksum/client/AllTests.java
@@ -33,11 +33,11 @@ public class AllTests
//
System.out.print("testing checksums... ");
System.out.flush();
- java.util.Iterator p = SliceChecksums.checksums.entrySet().iterator();
+ java.util.Iterator<java.util.Map.Entry<String, String> > p = SliceChecksums.checksums.entrySet().iterator();
while(p.hasNext())
{
- java.util.Map.Entry entry = (java.util.Map.Entry)p.next();
- String key = (String)entry.getKey();
+ java.util.Map.Entry<String, String> entry = p.next();
+ String key = entry.getKey();
int pos = key.indexOf("Local");
test(pos == -1);
}
@@ -45,7 +45,7 @@ public class AllTests
//
// Get server's Slice checksums.
//
- java.util.Map d = checksum.getSliceChecksums();
+ java.util.Map<String, String> d = checksum.getSliceChecksums();
//
// Compare the checksums. For a type FooN whose name ends in an integer N,
@@ -57,8 +57,8 @@ public class AllTests
while(p.hasNext())
{
int n = 0;
- java.util.Map.Entry entry = (java.util.Map.Entry)p.next();
- String key = (String)entry.getKey();
+ java.util.Map.Entry<String, String> entry = p.next();
+ String key = entry.getKey();
java.util.regex.Matcher m = patt.matcher(key);
if(m.find())
{
diff --git a/java/test/Ice/checksum/client/build.xml b/java/test/Ice/checksum/client/build.xml
index a6ea7f13571..4d1c5f71ae6 100644
--- a/java/test/Ice/checksum/client/build.xml
+++ b/java/test/Ice/checksum/client/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}" source="${jdk.version}" classpath="${lib.dir}"
debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}" classpath="${lib.dir}" excludes="generated/**"
debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/checksum/server/ChecksumI.java b/java/test/Ice/checksum/server/ChecksumI.java
index ed814db8934..4197a225702 100644
--- a/java/test/Ice/checksum/server/ChecksumI.java
+++ b/java/test/Ice/checksum/server/ChecksumI.java
@@ -15,7 +15,7 @@ public final class ChecksumI extends Test._ChecksumDisp
_adapter = adapter;
}
- public java.util.Map
+ public java.util.Map<String, String>
getSliceChecksums(Ice.Current __current)
{
return SliceChecksums.checksums;
diff --git a/java/test/Ice/checksum/server/build.xml b/java/test/Ice/checksum/server/build.xml
index 1328bd8059a..f88f72910e0 100644
--- a/java/test/Ice/checksum/server/build.xml
+++ b/java/test/Ice/checksum/server/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}" source="${jdk.version}" classpath="${lib.dir}"
debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}" classpath="${lib.dir}" excludes="generated/**"
debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/custom/build.xml b/java/test/Ice/custom/build.xml
index 51948790fdb..068805ccc36 100644
--- a/java/test/Ice/custom/build.xml
+++ b/java/test/Ice/custom/build.xml
@@ -48,11 +48,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**,jdk1.4/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/exceptions/build.xml b/java/test/Ice/exceptions/build.xml
index 1e6c8693481..3f515d646ca 100644
--- a/java/test/Ice/exceptions/build.xml
+++ b/java/test/Ice/exceptions/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/exceptionsAMD/build.xml b/java/test/Ice/exceptionsAMD/build.xml
index 5320a5f1fb9..3a85ff6b2b0 100644
--- a/java/test/Ice/exceptionsAMD/build.xml
+++ b/java/test/Ice/exceptionsAMD/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/facets/AllTests.java b/java/test/Ice/facets/AllTests.java
index 24fe827ee7a..8f7ac1ae49e 100644
--- a/java/test/Ice/facets/AllTests.java
+++ b/java/test/Ice/facets/AllTests.java
@@ -78,7 +78,7 @@ public class AllTests
adapter.addFacet(obj1, communicator.stringToIdentity("id2"), "f1");
adapter.addFacet(obj2, communicator.stringToIdentity("id2"), "f2");
adapter.addFacet(obj3, communicator.stringToIdentity("id2"), "");
- java.util.Map fm = adapter.removeAllFacets(communicator.stringToIdentity("id1"));
+ java.util.Map<String, Ice.Object> fm = adapter.removeAllFacets(communicator.stringToIdentity("id1"));
test(fm.size() == 2);
test(fm.get("f1") == obj1);
test(fm.get("f2") == obj2);
diff --git a/java/test/Ice/facets/build.xml b/java/test/Ice/facets/build.xml
index e2636d77d70..3d133b27906 100644
--- a/java/test/Ice/facets/build.xml
+++ b/java/test/Ice/facets/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/faultTolerance/Client.java b/java/test/Ice/faultTolerance/Client.java
index 4acdf7a54ea..a6f64994a4b 100644
--- a/java/test/Ice/faultTolerance/Client.java
+++ b/java/test/Ice/faultTolerance/Client.java
@@ -18,7 +18,7 @@ public class Client
private static int
run(String[] args, Ice.Communicator communicator)
{
- java.util.ArrayList ports = new java.util.ArrayList(args.length);
+ java.util.List<Integer> ports = new java.util.ArrayList<Integer>(args.length);
for(int i = 0; i < args.length; i++)
{
if(args[i].charAt(0) == '-')
@@ -43,7 +43,7 @@ public class Client
ex.printStackTrace();
return 1;
}
- ports.add(new Integer(port));
+ ports.add(port);
}
if(ports.isEmpty())
@@ -56,7 +56,7 @@ public class Client
int[] arr = new int[ports.size()];
for(int i = 0; i < arr.length; i++)
{
- arr[i] = ((Integer)ports.get(i)).intValue();
+ arr[i] = ports.get(i).intValue();
}
try
diff --git a/java/test/Ice/faultTolerance/build.xml b/java/test/Ice/faultTolerance/build.xml
index 15ce37af8d6..2d036c6610b 100644
--- a/java/test/Ice/faultTolerance/build.xml
+++ b/java/test/Ice/faultTolerance/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/hold/build.xml b/java/test/Ice/hold/build.xml
index 59b3089c714..e36117caca1 100644
--- a/java/test/Ice/hold/build.xml
+++ b/java/test/Ice/hold/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/inheritance/build.xml b/java/test/Ice/inheritance/build.xml
index e61dff66b52..662ef29dac6 100644
--- a/java/test/Ice/inheritance/build.xml
+++ b/java/test/Ice/inheritance/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/interceptor/build.xml b/java/test/Ice/interceptor/build.xml
index 6f706a10a7b..3ed12218f68 100644
--- a/java/test/Ice/interceptor/build.xml
+++ b/java/test/Ice/interceptor/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/location/ServerLocatorRegistry.java b/java/test/Ice/location/ServerLocatorRegistry.java
index a852965e111..a8c99fd02a2 100644
--- a/java/test/Ice/location/ServerLocatorRegistry.java
+++ b/java/test/Ice/location/ServerLocatorRegistry.java
@@ -42,7 +42,7 @@ public class ServerLocatorRegistry extends Test._TestLocatorRegistryDisp
getAdapter(String adapter)
throws Ice.AdapterNotFoundException
{
- Ice.ObjectPrx obj = (Ice.ObjectPrx)_adapters.get(adapter);
+ Ice.ObjectPrx obj = _adapters.get(adapter);
if(obj == null)
{
throw new Ice.AdapterNotFoundException();
@@ -54,7 +54,7 @@ public class ServerLocatorRegistry extends Test._TestLocatorRegistryDisp
getObject(Ice.Identity id)
throws Ice.ObjectNotFoundException
{
- Ice.ObjectPrx obj = (Ice.ObjectPrx)_objects.get(id);
+ Ice.ObjectPrx obj = _objects.get(id);
if(obj == null)
{
throw new Ice.ObjectNotFoundException();
@@ -62,6 +62,7 @@ public class ServerLocatorRegistry extends Test._TestLocatorRegistryDisp
return obj;
}
- private java.util.HashMap _adapters = new java.util.HashMap();
- private java.util.HashMap _objects = new java.util.HashMap();
+ private java.util.HashMap<String, Ice.ObjectPrx> _adapters = new java.util.HashMap<String, Ice.ObjectPrx>();
+ private java.util.HashMap<Ice.Identity, Ice.ObjectPrx> _objects =
+ new java.util.HashMap<Ice.Identity, Ice.ObjectPrx>();
}
diff --git a/java/test/Ice/location/ServerManagerI.java b/java/test/Ice/location/ServerManagerI.java
index 3407472fdb8..d863de85876 100644
--- a/java/test/Ice/location/ServerManagerI.java
+++ b/java/test/Ice/location/ServerManagerI.java
@@ -15,7 +15,7 @@ public class ServerManagerI extends _ServerManagerDisp
{
_adapter = adapter;
_registry = registry;
- _communicators = new java.util.ArrayList();
+ _communicators = new java.util.ArrayList<Ice.Communicator>();
_initData = initData;
_initData.properties.setProperty("TestAdapter.Endpoints", "default");
@@ -28,10 +28,10 @@ public class ServerManagerI extends _ServerManagerDisp
public void
startServer(Ice.Current current)
{
- java.util.Iterator i = _communicators.iterator();
+ java.util.Iterator<Ice.Communicator> i = _communicators.iterator();
while(i.hasNext())
{
- Ice.Communicator c = (Ice.Communicator)i.next();
+ Ice.Communicator c = i.next();
c.waitForShutdown();
c.destroy();
}
@@ -67,16 +67,16 @@ public class ServerManagerI extends _ServerManagerDisp
public void
shutdown(Ice.Current current)
{
- java.util.Iterator i = _communicators.iterator();
+ java.util.Iterator<Ice.Communicator> i = _communicators.iterator();
while(i.hasNext())
{
- ((Ice.Communicator)i.next()).destroy();
+ i.next().destroy();
}
_adapter.getCommunicator().shutdown();
}
private Ice.ObjectAdapter _adapter;
private ServerLocatorRegistry _registry;
- private java.util.ArrayList _communicators;
+ private java.util.List<Ice.Communicator> _communicators;
private Ice.InitializationData _initData;
}
diff --git a/java/test/Ice/location/build.xml b/java/test/Ice/location/build.xml
index 10d07658c12..c177d789f8f 100644
--- a/java/test/Ice/location/build.xml
+++ b/java/test/Ice/location/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/objects/build.xml b/java/test/Ice/objects/build.xml
index 54564dfe795..203c2149bd4 100644
--- a/java/test/Ice/objects/build.xml
+++ b/java/test/Ice/objects/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/operations/MyDerivedClassI.java b/java/test/Ice/operations/MyDerivedClassI.java
index 4410d622a29..3f3da413448 100644
--- a/java/test/Ice/operations/MyDerivedClassI.java
+++ b/java/test/Ice/operations/MyDerivedClassI.java
@@ -81,13 +81,13 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
return p1;
}
- public java.util.Map
- opByteBoolD(java.util.Map p1, java.util.Map p2,
+ public java.util.Map<Byte, Boolean>
+ opByteBoolD(java.util.Map<Byte, Boolean> p1, java.util.Map<Byte, Boolean> p2,
Test.ByteBoolDHolder p3,
Ice.Current current)
{
p3.value = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<Byte, Boolean> r = new java.util.HashMap<Byte, Boolean>();
r.putAll(p1);
r.putAll(p2);
return r;
@@ -174,13 +174,13 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
return r;
}
- public java.util.Map
- opLongFloatD(java.util.Map p1, java.util.Map p2,
+ public java.util.Map<Long, Float>
+ opLongFloatD(java.util.Map<Long, Float> p1, java.util.Map<Long, Float> p2,
Test.LongFloatDHolder p3,
Ice.Current current)
{
p3.value = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<Long, Float> r = new java.util.HashMap<Long, Float>();
r.putAll(p1);
r.putAll(p2);
return r;
@@ -206,13 +206,13 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
return Test.MyEnum.enum3;
}
- public java.util.Map
- opShortIntD(java.util.Map p1, java.util.Map p2,
+ public java.util.Map<Short, Integer>
+ opShortIntD(java.util.Map<Short, Integer> p1, java.util.Map<Short, Integer> p2,
Test.ShortIntDHolder p3,
Ice.Current current)
{
p3.value = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<Short, Integer> r = new java.util.HashMap<Short, Integer>();
r.putAll(p1);
r.putAll(p2);
return r;
@@ -272,13 +272,13 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
return p1 + " " + p2;
}
- public java.util.Map
- opStringMyEnumD(java.util.Map p1, java.util.Map p2,
+ public java.util.Map<String, Test.MyEnum>
+ opStringMyEnumD(java.util.Map<String, Test.MyEnum> p1, java.util.Map<String, Test.MyEnum> p2,
Test.StringMyEnumDHolder p3,
Ice.Current current)
{
p3.value = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<String, Test.MyEnum> r = new java.util.HashMap<String, Test.MyEnum>();
r.putAll(p1);
r.putAll(p2);
return r;
@@ -300,7 +300,7 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
{
}
- public java.util.Map
+ public java.util.Map<String, String>
opContext(Ice.Current current)
{
return current.ctx;
@@ -368,13 +368,13 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
return r;
}
- public java.util.Map
- opStringStringD(java.util.Map p1, java.util.Map p2,
+ public java.util.Map<String, String>
+ opStringStringD(java.util.Map<String, String> p1, java.util.Map<String, String> p2,
Test.StringStringDHolder p3,
Ice.Current current)
{
p3.value = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<String, String> r = new java.util.HashMap<String, String>();
r.putAll(p1);
r.putAll(p2);
return r;
diff --git a/java/test/Ice/operations/Twoways.java b/java/test/Ice/operations/Twoways.java
index 1e1864ba9a4..7e1343f6195 100644
--- a/java/test/Ice/operations/Twoways.java
+++ b/java/test/Ice/operations/Twoways.java
@@ -479,103 +479,103 @@ class Twoways
}
{
- java.util.Map di1 = new java.util.HashMap();
- di1.put(new Byte((byte)10), Boolean.TRUE);
- di1.put(new Byte((byte)100), Boolean.FALSE);
- java.util.Map di2 = new java.util.HashMap();
- di2.put(new Byte((byte)10), Boolean.TRUE);
- di2.put(new Byte((byte)11), Boolean.FALSE);
- di2.put(new Byte((byte)101), Boolean.TRUE);
+ java.util.Map<Byte, Boolean> di1 = new java.util.HashMap<Byte, Boolean>();
+ di1.put((byte)10, Boolean.TRUE);
+ di1.put((byte)100, Boolean.FALSE);
+ java.util.Map<Byte, Boolean> di2 = new java.util.HashMap<Byte, Boolean>();
+ di2.put((byte)10, Boolean.TRUE);
+ di2.put((byte)11, Boolean.FALSE);
+ di2.put((byte)101, Boolean.TRUE);
Test.ByteBoolDHolder _do = new Test.ByteBoolDHolder();
- java.util.Map ro = p.opByteBoolD(di1, di2, _do);
+ java.util.Map<Byte, Boolean> ro = p.opByteBoolD(di1, di2, _do);
test(_do.value.equals(di1));
test(ro.size() == 4);
- test(((Boolean)ro.get(new Byte((byte)10))).booleanValue() == true);
- test(((Boolean)ro.get(new Byte((byte)11))).booleanValue() == false);
- test(((Boolean)ro.get(new Byte((byte)100))).booleanValue() == false);
- test(((Boolean)ro.get(new Byte((byte)101))).booleanValue() == true);
+ test(ro.get((byte)10).booleanValue() == true);
+ test(ro.get((byte)11).booleanValue() == false);
+ test(ro.get((byte)100).booleanValue() == false);
+ test(ro.get((byte)101).booleanValue() == true);
}
{
- java.util.Map di1 = new java.util.HashMap();
- di1.put(new Short((short)110), new Integer(-1));
- di1.put(new Short((short)1100), new Integer(123123));
- java.util.Map di2 = new java.util.HashMap();
- di2.put(new Short((short)110), new Integer(-1));
- di2.put(new Short((short)111), new Integer(-100));
- di2.put(new Short((short)1101), new Integer(0));
+ java.util.Map<Short, Integer> di1 = new java.util.HashMap<Short, Integer>();
+ di1.put((short)110, -1);
+ di1.put((short)1100, 123123);
+ java.util.Map<Short, Integer> di2 = new java.util.HashMap<Short, Integer>();
+ di2.put((short)110, -1);
+ di2.put((short)111, -100);
+ di2.put((short)1101, 0);
Test.ShortIntDHolder _do = new Test.ShortIntDHolder();
- java.util.Map ro = p.opShortIntD(di1, di2, _do);
+ java.util.Map<Short, Integer> ro = p.opShortIntD(di1, di2, _do);
test(_do.value.equals(di1));
test(ro.size() == 4);
- test(((Integer)ro.get(new Short((short)110))).intValue() == -1);
- test(((Integer)ro.get(new Short((short)111))).intValue() == -100);
- test(((Integer)ro.get(new Short((short)1100))).intValue() == 123123);
- test(((Integer)ro.get(new Short((short)1101))).intValue() == 0);
+ test(ro.get((short)110).intValue() == -1);
+ test(ro.get((short)111).intValue() == -100);
+ test(ro.get((short)1100).intValue() == 123123);
+ test(ro.get((short)1101).intValue() == 0);
}
{
- java.util.Map di1 = new java.util.HashMap();
- di1.put(new Long(999999110L), new Float(-1.1f));
- di1.put(new Long(999999111L), new Float(123123.2f));
- java.util.Map di2 = new java.util.HashMap();
- di2.put(new Long(999999110L), new Float(-1.1f));
- di2.put(new Long(999999120L), new Float(-100.4f));
- di2.put(new Long(999999130L), new Float(0.5f));
+ java.util.Map<Long, Float> di1 = new java.util.HashMap<Long, Float>();
+ di1.put(999999110L, new Float(-1.1f));
+ di1.put(999999111L, new Float(123123.2f));
+ java.util.Map<Long, Float> di2 = new java.util.HashMap<Long, Float>();
+ di2.put(999999110L, new Float(-1.1f));
+ di2.put(999999120L, new Float(-100.4f));
+ di2.put(999999130L, new Float(0.5f));
Test.LongFloatDHolder _do = new Test.LongFloatDHolder();
- java.util.Map ro = p.opLongFloatD(di1, di2, _do);
+ java.util.Map<Long, Float> ro = p.opLongFloatD(di1, di2, _do);
test(_do.value.equals(di1));
test(ro.size() == 4);
- test(((Float)ro.get(new Long(999999110L))).floatValue() == -1.1f);
- test(((Float)ro.get(new Long(999999120L))).floatValue() == -100.4f);
- test(((Float)ro.get(new Long(999999111L))).floatValue() == 123123.2f);
- test(((Float)ro.get(new Long(999999130L))).floatValue() == 0.5f);
+ test(ro.get(999999110L).floatValue() == -1.1f);
+ test(ro.get(999999120L).floatValue() == -100.4f);
+ test(ro.get(999999111L).floatValue() == 123123.2f);
+ test(ro.get(999999130L).floatValue() == 0.5f);
}
{
- java.util.Map di1 = new java.util.HashMap();
+ java.util.Map<String, String> di1 = new java.util.HashMap<String, String>();
di1.put("foo", "abc -1.1");
di1.put("bar", "abc 123123.2");
- java.util.Map di2 = new java.util.HashMap();
+ java.util.Map<String, String> di2 = new java.util.HashMap<String, String>();
di2.put("foo", "abc -1.1");
di2.put("FOO", "abc -100.4");
di2.put("BAR", "abc 0.5");
Test.StringStringDHolder _do = new Test.StringStringDHolder();
- java.util.Map ro = p.opStringStringD(di1, di2, _do);
+ java.util.Map<String, String> ro = p.opStringStringD(di1, di2, _do);
test(_do.value.equals(di1));
test(ro.size() == 4);
- test(((String)ro.get("foo")).equals("abc -1.1"));
- test(((String)ro.get("FOO")).equals("abc -100.4"));
- test(((String)ro.get("bar")).equals("abc 123123.2"));
- test(((String)ro.get("BAR")).equals("abc 0.5"));
+ test(ro.get("foo").equals("abc -1.1"));
+ test(ro.get("FOO").equals("abc -100.4"));
+ test(ro.get("bar").equals("abc 123123.2"));
+ test(ro.get("BAR").equals("abc 0.5"));
}
{
- java.util.Map di1 = new java.util.HashMap();
+ java.util.Map<String, Test.MyEnum> di1 = new java.util.HashMap<String, Test.MyEnum>();
di1.put("abc", Test.MyEnum.enum1);
di1.put("", Test.MyEnum.enum2);
- java.util.Map di2 = new java.util.HashMap();
+ java.util.Map<String, Test.MyEnum> di2 = new java.util.HashMap<String, Test.MyEnum>();
di2.put("abc", Test.MyEnum.enum1);
di2.put("qwerty", Test.MyEnum.enum3);
di2.put("Hello!!", Test.MyEnum.enum2);
Test.StringMyEnumDHolder _do = new Test.StringMyEnumDHolder();
- java.util.Map ro = p.opStringMyEnumD(di1, di2, _do);
+ java.util.Map<String, Test.MyEnum> ro = p.opStringMyEnumD(di1, di2, _do);
test(_do.value.equals(di1));
test(ro.size() == 4);
- test(((Test.MyEnum)ro.get("abc")) == Test.MyEnum.enum1);
- test(((Test.MyEnum)ro.get("qwerty")) == Test.MyEnum.enum3);
- test(((Test.MyEnum)ro.get("")) == Test.MyEnum.enum2);
- test(((Test.MyEnum)ro.get("Hello!!")) == Test.MyEnum.enum2);
+ test(ro.get("abc") == Test.MyEnum.enum1);
+ test(ro.get("qwerty") == Test.MyEnum.enum3);
+ test(ro.get("") == Test.MyEnum.enum2);
+ test(ro.get("Hello!!") == Test.MyEnum.enum2);
}
{
@@ -598,24 +598,24 @@ class Twoways
}
{
- java.util.HashMap ctx = new java.util.HashMap();
+ java.util.Map<String, String> ctx = new java.util.HashMap<String, String>();
ctx.put("one", "ONE");
ctx.put("two", "TWO");
ctx.put("three", "THREE");
{
test(p.ice_getContext().isEmpty());
- java.util.Map r = p.opContext();
+ java.util.Map<String, String> r = p.opContext();
test(!r.equals(ctx));
}
{
- java.util.Map r = p.opContext(ctx);
+ java.util.Map<String, String> r = p.opContext(ctx);
test(p.ice_getContext().isEmpty());
test(r.equals(ctx));
}
{
Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(p.ice_context(ctx));
test(p2.ice_getContext().equals(ctx));
- java.util.Map r = p2.opContext();
+ java.util.Map<String, String> r = p2.opContext();
test(r.equals(ctx));
r = p2.opContext(ctx);
test(r.equals(ctx));
@@ -669,53 +669,53 @@ class Twoways
//
// Test implicit context propagation
//
-
+
String[] impls = {"Shared", "PerThread"};
for(int i = 0; i < 2; i++)
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = communicator.getProperties()._clone();
initData.properties.setProperty("Ice.ImplicitContext", impls[i]);
-
+
Ice.Communicator ic = Ice.Util.initialize(initData);
-
- java.util.Map ctx = new java.util.HashMap();
+
+ java.util.Map<String, String> ctx = new java.util.HashMap<String, String>();
ctx.put("one", "ONE");
ctx.put("two", "TWO");
ctx.put("three", "THREE");
-
+
Test.MyClassPrx p3 = Test.MyClassPrxHelper.uncheckedCast(
ic.stringToProxy("test:default -p 12010 -t 10000"));
-
+
ic.getImplicitContext().setContext(ctx);
test(ic.getImplicitContext().getContext().equals(ctx));
test(p3.opContext().equals(ctx));
-
+
test(ic.getImplicitContext().containsKey("zero") == false);
String r = ic.getImplicitContext().put("zero", "ZERO");
test(r.equals(""));
test(ic.getImplicitContext().containsKey("zero") == true);
test(ic.getImplicitContext().get("zero").equals("ZERO"));
-
+
ctx = ic.getImplicitContext().getContext();
test(p3.opContext().equals(ctx));
-
- java.util.Map prxContext = new java.util.HashMap();
+
+ java.util.Map<String, String> prxContext = new java.util.HashMap<String, String>();
prxContext.put("one", "UN");
prxContext.put("four", "QUATRE");
-
- java.util.Map combined = new java.util.HashMap(ctx);
+
+ java.util.Map<String, String> combined = new java.util.HashMap<String, String>(ctx);
combined.putAll(prxContext);
test(combined.get("one").equals("UN"));
-
+
p3 = Test.MyClassPrxHelper.uncheckedCast(p3.ice_context(prxContext));
-
+
ic.getImplicitContext().setContext(null);
test(p3.opContext().equals(prxContext));
-
+
ic.getImplicitContext().setContext(ctx);
test(p3.opContext().equals(combined));
-
+
test(ic.getImplicitContext().remove("one").equals("ONE"));
ic.destroy();
diff --git a/java/test/Ice/operations/TwowaysAMI.java b/java/test/Ice/operations/TwowaysAMI.java
index 29840d3f4af..0b3d430585f 100644
--- a/java/test/Ice/operations/TwowaysAMI.java
+++ b/java/test/Ice/operations/TwowaysAMI.java
@@ -48,7 +48,7 @@ class TwowaysAMI
_called = false;
return true;
}
-
+
public synchronized void
called()
{
@@ -777,17 +777,17 @@ class TwowaysAMI
private static class AMI_MyClass_opByteBoolDI extends Test.AMI_MyClass_opByteBoolD
{
public void
- ice_response(java.util.Map ro, java.util.Map _do)
+ ice_response(java.util.Map<Byte, Boolean> ro, java.util.Map<Byte, Boolean> _do)
{
- java.util.Map di1 = new java.util.HashMap();
- di1.put(new Byte((byte)10), Boolean.TRUE);
- di1.put(new Byte((byte)100), Boolean.FALSE);
+ java.util.Map<Byte, Boolean> di1 = new java.util.HashMap<Byte, Boolean>();
+ di1.put((byte)10, Boolean.TRUE);
+ di1.put((byte)100, Boolean.FALSE);
test(_do.equals(di1));
test(ro.size() == 4);
- test(((Boolean)ro.get(new Byte((byte)10))).booleanValue() == true);
- test(((Boolean)ro.get(new Byte((byte)11))).booleanValue() == false);
- test(((Boolean)ro.get(new Byte((byte)100))).booleanValue() == false);
- test(((Boolean)ro.get(new Byte((byte)101))).booleanValue() == true);
+ test(ro.get((byte)10).booleanValue() == true);
+ test(ro.get((byte)11).booleanValue() == false);
+ test(ro.get((byte)100).booleanValue() == false);
+ test(ro.get((byte)101).booleanValue() == true);
callback.called();
}
@@ -809,17 +809,17 @@ class TwowaysAMI
private static class AMI_MyClass_opShortIntDI extends Test.AMI_MyClass_opShortIntD
{
public void
- ice_response(java.util.Map ro, java.util.Map _do)
+ ice_response(java.util.Map<Short, Integer> ro, java.util.Map<Short, Integer> _do)
{
- java.util.Map di1 = new java.util.HashMap();
- di1.put(new Short((short)110), new Integer(-1));
- di1.put(new Short((short)1100), new Integer(123123));
+ java.util.Map<Short, Integer> di1 = new java.util.HashMap<Short, Integer>();
+ di1.put((short)110, -1);
+ di1.put((short)1100, 123123);
test(_do.equals(di1));
test(ro.size() == 4);
- test(((Integer)ro.get(new Short((short)110))).intValue() == -1);
- test(((Integer)ro.get(new Short((short)111))).intValue() == -100);
- test(((Integer)ro.get(new Short((short)1100))).intValue() == 123123);
- test(((Integer)ro.get(new Short((short)1101))).intValue() == 0);
+ test(ro.get((short)110).intValue() == -1);
+ test(ro.get((short)111).intValue() == -100);
+ test(ro.get((short)1100).intValue() == 123123);
+ test(ro.get((short)1101).intValue() == 0);
callback.called();
}
@@ -841,17 +841,17 @@ class TwowaysAMI
private static class AMI_MyClass_opLongFloatDI extends Test.AMI_MyClass_opLongFloatD
{
public void
- ice_response(java.util.Map ro, java.util.Map _do)
+ ice_response(java.util.Map<Long, Float> ro, java.util.Map<Long, Float> _do)
{
- java.util.Map di1 = new java.util.HashMap();
- di1.put(new Long(999999110L), new Float(-1.1f));
- di1.put(new Long(999999111L), new Float(123123.2f));
+ java.util.Map<Long, Float> di1 = new java.util.HashMap<Long, Float>();
+ di1.put(999999110L, new Float(-1.1f));
+ di1.put(999999111L, new Float(123123.2f));
test(_do.equals(di1));
test(ro.size() == 4);
- test(((Float)ro.get(new Long(999999110L))).floatValue() == -1.1f);
- test(((Float)ro.get(new Long(999999120L))).floatValue() == -100.4f);
- test(((Float)ro.get(new Long(999999111L))).floatValue() == 123123.2f);
- test(((Float)ro.get(new Long(999999130L))).floatValue() == 0.5f);
+ test(ro.get(999999110L).floatValue() == -1.1f);
+ test(ro.get(999999120L).floatValue() == -100.4f);
+ test(ro.get(999999111L).floatValue() == 123123.2f);
+ test(ro.get(999999130L).floatValue() == 0.5f);
callback.called();
}
@@ -873,17 +873,17 @@ class TwowaysAMI
private static class AMI_MyClass_opStringStringDI extends Test.AMI_MyClass_opStringStringD
{
public void
- ice_response(java.util.Map ro, java.util.Map _do)
+ ice_response(java.util.Map<String, String> ro, java.util.Map<String, String> _do)
{
- java.util.Map di1 = new java.util.HashMap();
+ java.util.Map<String, String> di1 = new java.util.HashMap<String, String>();
di1.put("foo", "abc -1.1");
di1.put("bar", "abc 123123.2");
test(_do.equals(di1));
test(ro.size() == 4);
- test(((String)ro.get("foo")).equals("abc -1.1"));
- test(((String)ro.get("FOO")).equals("abc -100.4"));
- test(((String)ro.get("bar")).equals("abc 123123.2"));
- test(((String)ro.get("BAR")).equals("abc 0.5"));
+ test(ro.get("foo").equals("abc -1.1"));
+ test(ro.get("FOO").equals("abc -100.4"));
+ test(ro.get("bar").equals("abc 123123.2"));
+ test(ro.get("BAR").equals("abc 0.5"));
callback.called();
}
@@ -905,17 +905,17 @@ class TwowaysAMI
private static class AMI_MyClass_opStringMyEnumDI extends Test.AMI_MyClass_opStringMyEnumD
{
public void
- ice_response(java.util.Map ro, java.util.Map _do)
+ ice_response(java.util.Map<String, Test.MyEnum> ro, java.util.Map<String, Test.MyEnum> _do)
{
- java.util.Map di1 = new java.util.HashMap();
+ java.util.Map<String, Test.MyEnum> di1 = new java.util.HashMap<String, Test.MyEnum>();
di1.put("abc", Test.MyEnum.enum1);
di1.put("", Test.MyEnum.enum2);
test(_do.equals(di1));
test(ro.size() == 4);
- test(((Test.MyEnum)ro.get("abc")) == Test.MyEnum.enum1);
- test(((Test.MyEnum)ro.get("qwerty")) == Test.MyEnum.enum3);
- test(((Test.MyEnum)ro.get("")) == Test.MyEnum.enum2);
- test(((Test.MyEnum)ro.get("Hello!!")) == Test.MyEnum.enum2);
+ test(ro.get("abc") == Test.MyEnum.enum1);
+ test(ro.get("qwerty") == Test.MyEnum.enum3);
+ test(ro.get("") == Test.MyEnum.enum2);
+ test(ro.get("Hello!!") == Test.MyEnum.enum2);
callback.called();
}
@@ -970,13 +970,13 @@ class TwowaysAMI
private static class AMI_MyClass_opContextEqualI extends Test.AMI_MyClass_opContext
{
- AMI_MyClass_opContextEqualI(java.util.Map d)
+ AMI_MyClass_opContextEqualI(java.util.Map<String, String> d)
{
_d = d;
}
public void
- ice_response(java.util.Map r)
+ ice_response(java.util.Map<String, String> r)
{
test(r.equals(_d));
callback.called();
@@ -994,19 +994,19 @@ class TwowaysAMI
return callback.check();
}
- private java.util.Map _d;
+ private java.util.Map<String, String> _d;
private Callback callback = new Callback();
}
private static class AMI_MyClass_opContextNotEqualI extends Test.AMI_MyClass_opContext
{
- AMI_MyClass_opContextNotEqualI(java.util.Map d)
+ AMI_MyClass_opContextNotEqualI(java.util.Map<String, String> d)
{
_d = d;
}
public void
- ice_response(java.util.Map r)
+ ice_response(java.util.Map<String, String> r)
{
test(!r.equals(_d));
callback.called();
@@ -1024,7 +1024,7 @@ class TwowaysAMI
return callback.check();
}
- private java.util.Map _d;
+ private java.util.Map<String, String> _d;
private Callback callback = new Callback();
}
@@ -1125,9 +1125,9 @@ class TwowaysAMI
Ice.Communicator ic = Ice.Util.initialize(initData);
Ice.ObjectPrx obj = ic.stringToProxy(p.ice_toString());
Test.MyClassPrx p2 = Test.MyClassPrxHelper.checkedCast(obj);
-
+
ic.destroy();
-
+
AMI_MyClass_opVoidI cb = new AMI_MyClass_opVoidI();
try
{
@@ -1152,13 +1152,13 @@ class TwowaysAMI
p.opBool_async(cb, true, false);
test(cb.check());
}
-
+
{
AMI_MyClass_opShortIntLongI cb = new AMI_MyClass_opShortIntLongI();
p.opShortIntLong_async(cb, (short)10, 11, 12L);
test(cb.check());
}
-
+
{
AMI_MyClass_opFloatDoubleI cb = new AMI_MyClass_opFloatDoubleI();
p.opFloatDouble_async(cb, 3.14f, 1.1E10);
@@ -1167,25 +1167,25 @@ class TwowaysAMI
p.opFloatDouble_async(cb, 3.14f, 1.1E10);
test(cb.check());
}
-
+
{
AMI_MyClass_opStringI cb = new AMI_MyClass_opStringI();
p.opString_async(cb, "hello", "world");
test(cb.check());
}
-
+
{
AMI_MyClass_opMyEnumI cb = new AMI_MyClass_opMyEnumI();
p.opMyEnum_async(cb, Test.MyEnum.enum2);
test(cb.check());
}
-
+
{
AMI_MyClass_opMyClassI cb = new AMI_MyClass_opMyClassI(communicator);
p.opMyClass_async(cb, p);
test(cb.check());
}
-
+
{
Test.Structure si1 = new Test.Structure();
si1.p = p;
@@ -1197,12 +1197,12 @@ class TwowaysAMI
si2.e = Test.MyEnum.enum2;
si2.s = new Test.AnotherStruct();
si2.s.s = "def";
-
+
AMI_MyClass_opStructI cb = new AMI_MyClass_opStructI(communicator);
p.opStruct_async(cb, si1, si2);
test(cb.check());
}
-
+
{
final byte[] bsi1 =
{
@@ -1218,49 +1218,49 @@ class TwowaysAMI
(byte)0xf3,
(byte)0xf4
};
-
+
AMI_MyClass_opByteSI cb = new AMI_MyClass_opByteSI();
p.opByteS_async(cb, bsi1, bsi2);
test(cb.check());
}
-
+
{
final boolean[] bsi1 = { true, true, false };
final boolean[] bsi2 = { false };
-
+
AMI_MyClass_opBoolSI cb = new AMI_MyClass_opBoolSI();
p.opBoolS_async(cb, bsi1, bsi2);
test(cb.check());
}
-
+
{
final short[] ssi = { 1, 2, 3 };
final int[] isi = { 5, 6, 7, 8 };
final long[] lsi = { 10, 30, 20 };
-
+
AMI_MyClass_opShortIntLongSI cb = new AMI_MyClass_opShortIntLongSI();
p.opShortIntLongS_async(cb, ssi, isi, lsi);
test(cb.check());
}
-
+
{
final float[] fsi = { 3.14f, 1.11f };
final double[] dsi = { 1.1E10, 1.2E10, 1.3E10 };
-
+
AMI_MyClass_opFloatDoubleSI cb = new AMI_MyClass_opFloatDoubleSI();
p.opFloatDoubleS_async(cb, fsi, dsi);
test(cb.check());
}
-
+
{
final String[] ssi1 = { "abc", "de", "fghi" };
final String[] ssi2 = { "xyz" };
-
+
AMI_MyClass_opStringSI cb = new AMI_MyClass_opStringSI();
p.opStringS_async(cb, ssi1, ssi2);
test(cb.check());
}
-
+
{
final byte[][] bsi1 =
{
@@ -1356,13 +1356,13 @@ class TwowaysAMI
}
{
- java.util.Map di1 = new java.util.HashMap();
- di1.put(new Byte((byte)10), Boolean.TRUE);
- di1.put(new Byte((byte)100), Boolean.FALSE);
- java.util.Map di2 = new java.util.HashMap();
- di2.put(new Byte((byte)10), Boolean.TRUE);
- di2.put(new Byte((byte)11), Boolean.FALSE);
- di2.put(new Byte((byte)101), Boolean.TRUE);
+ java.util.Map<Byte, Boolean> di1 = new java.util.HashMap<Byte, Boolean>();
+ di1.put((byte)10, Boolean.TRUE);
+ di1.put((byte)100, Boolean.FALSE);
+ java.util.Map<Byte, Boolean> di2 = new java.util.HashMap<Byte, Boolean>();
+ di2.put((byte)10, Boolean.TRUE);
+ di2.put((byte)11, Boolean.FALSE);
+ di2.put((byte)101, Boolean.TRUE);
AMI_MyClass_opByteBoolDI cb = new AMI_MyClass_opByteBoolDI();
p.opByteBoolD_async(cb, di1, di2);
@@ -1370,13 +1370,13 @@ class TwowaysAMI
}
{
- java.util.Map di1 = new java.util.HashMap();
- di1.put(new Short((short)110), new Integer(-1));
- di1.put(new Short((short)1100), new Integer(123123));
- java.util.Map di2 = new java.util.HashMap();
- di2.put(new Short((short)110), new Integer(-1));
- di2.put(new Short((short)111), new Integer(-100));
- di2.put(new Short((short)1101), new Integer(0));
+ java.util.Map<Short, Integer> di1 = new java.util.HashMap<Short, Integer>();
+ di1.put((short)110, -1);
+ di1.put((short)1100, 123123);
+ java.util.Map<Short, Integer> di2 = new java.util.HashMap<Short, Integer>();
+ di2.put((short)110, -1);
+ di2.put((short)111, -100);
+ di2.put((short)1101, 0);
AMI_MyClass_opShortIntDI cb = new AMI_MyClass_opShortIntDI();
p.opShortIntD_async(cb, di1, di2);
@@ -1384,13 +1384,13 @@ class TwowaysAMI
}
{
- java.util.Map di1 = new java.util.HashMap();
- di1.put(new Long(999999110L), new Float(-1.1f));
- di1.put(new Long(999999111L), new Float(123123.2f));
- java.util.Map di2 = new java.util.HashMap();
- di2.put(new Long(999999110L), new Float(-1.1f));
- di2.put(new Long(999999120L), new Float(-100.4f));
- di2.put(new Long(999999130L), new Float(0.5f));
+ java.util.Map<Long, Float> di1 = new java.util.HashMap<Long, Float>();
+ di1.put(999999110L, new Float(-1.1f));
+ di1.put(999999111L, new Float(123123.2f));
+ java.util.Map<Long, Float> di2 = new java.util.HashMap<Long, Float>();
+ di2.put(999999110L, new Float(-1.1f));
+ di2.put(999999120L, new Float(-100.4f));
+ di2.put(999999130L, new Float(0.5f));
AMI_MyClass_opLongFloatDI cb = new AMI_MyClass_opLongFloatDI();
p.opLongFloatD_async(cb, di1, di2);
@@ -1398,10 +1398,10 @@ class TwowaysAMI
}
{
- java.util.Map di1 = new java.util.HashMap();
+ java.util.Map<String, String> di1 = new java.util.HashMap<String, String>();
di1.put("foo", "abc -1.1");
di1.put("bar", "abc 123123.2");
- java.util.Map di2 = new java.util.HashMap();
+ java.util.Map<String, String> di2 = new java.util.HashMap<String, String>();
di2.put("foo", "abc -1.1");
di2.put("FOO", "abc -100.4");
di2.put("BAR", "abc 0.5");
@@ -1412,10 +1412,10 @@ class TwowaysAMI
}
{
- java.util.Map di1 = new java.util.HashMap();
+ java.util.Map<String, Test.MyEnum> di1 = new java.util.HashMap<String, Test.MyEnum>();
di1.put("abc", Test.MyEnum.enum1);
di1.put("", Test.MyEnum.enum2);
- java.util.Map di2 = new java.util.HashMap();
+ java.util.Map<String, Test.MyEnum> di2 = new java.util.HashMap<String, Test.MyEnum>();
di2.put("abc", Test.MyEnum.enum1);
di2.put("qwerty", Test.MyEnum.enum3);
di2.put("Hello!!", Test.MyEnum.enum2);
@@ -1442,7 +1442,7 @@ class TwowaysAMI
}
{
- java.util.Map ctx = new java.util.HashMap();
+ java.util.Map<String, String> ctx = new java.util.HashMap<String, String>();
ctx.put("one", "ONE");
ctx.put("two", "TWO");
ctx.put("three", "THREE");
@@ -1476,7 +1476,7 @@ class TwowaysAMI
// Test that default context is obtained correctly from communicator.
//
/* DEPRECATED
- java.util.HashMap dflt = new java.util.HashMap();
+ java.util.HashMap<String, String> dflt = new java.util.HashMap<String, String>();
dflt.put("a", "b");
communicator.setDefaultContext(dflt);
{
@@ -1485,9 +1485,10 @@ class TwowaysAMI
test(cb.check());
}
- p2 = Test.MyClassPrxHelper.uncheckedCast(p.ice_context(new java.util.HashMap()));
+ p2 = Test.MyClassPrxHelper.uncheckedCast(p.ice_context(new java.util.HashMap<String, String>()));
{
- AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(new java.util.HashMap());
+ AMI_MyClass_opContextEqualI cb =
+ new AMI_MyClass_opContextEqualI(new java.util.HashMap<String, String>());
p2.opContext_async(cb);
test(cb.check());
}
@@ -1501,7 +1502,8 @@ class TwowaysAMI
communicator.setDefaultContext(new java.util.HashMap());
{
- AMI_MyClass_opContextNotEqualI cb = new AMI_MyClass_opContextNotEqualI(new java.util.HashMap());
+ AMI_MyClass_opContextNotEqualI cb =
+ new AMI_MyClass_opContextNotEqualI(new java.util.HashMap<String, String>());
p2.opContext_async(cb);
test(cb.check());
}
@@ -1510,7 +1512,7 @@ class TwowaysAMI
Test.MyClassPrx c = Test.MyClassPrxHelper.checkedCast(
communicator.stringToProxy("test:default -p 12010 -t 10000"));
{
- java.util.HashMap tmp = new java.util.HashMap();
+ java.util.HashMap<String, String> tmp = new java.util.HashMap<String, String>();
tmp.put("a", "b");
AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(tmp);
c.opContext_async(cb);
@@ -1520,7 +1522,7 @@ class TwowaysAMI
dflt.put("a", "c");
Test.MyClassPrx c2 = Test.MyClassPrxHelper.uncheckedCast(c.ice_context(dflt));
{
- java.util.HashMap tmp = new java.util.HashMap();
+ java.util.HashMap<String, String> tmp = new java.util.HashMap<String, String>();
tmp.put("a", "c");
AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(tmp);
c2.opContext_async(cb);
@@ -1530,7 +1532,7 @@ class TwowaysAMI
dflt.clear();
Test.MyClassPrx c3 = Test.MyClassPrxHelper.uncheckedCast(c2.ice_context(dflt));
{
- java.util.HashMap tmp = new java.util.HashMap();
+ java.util.HashMap<String, String> tmp = new java.util.HashMap<String, String>();
AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(tmp);
c3.opContext_async(cb);
test(cb.check());
@@ -1538,7 +1540,7 @@ class TwowaysAMI
Test.MyClassPrx c4 = Test.MyClassPrxHelper.uncheckedCast(c.ice_defaultContext());
{
- java.util.HashMap tmp = new java.util.HashMap();
+ java.util.HashMap<String, String> tmp = new java.util.HashMap<String, String>();
tmp.put("a", "b");
AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(tmp);
c4.opContext_async(cb);
@@ -1550,14 +1552,14 @@ class TwowaysAMI
Test.MyClassPrx c5 = Test.MyClassPrxHelper.uncheckedCast(c.ice_defaultContext());
{
- java.util.HashMap tmp = new java.util.HashMap();
+ java.util.HashMap<String, String> tmp = new java.util.HashMap<String, String>();
tmp.put("a", "d");
AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(tmp);
c5.opContext_async(cb);
test(cb.check());
}
- communicator.setDefaultContext(new java.util.HashMap());
+ communicator.setDefaultContext(new java.util.HashMap<String, String>());
*/
}
}
@@ -1566,24 +1568,24 @@ class TwowaysAMI
//
// Test implicit context propagation
//
-
+
String[] impls = {"Shared", "PerThread"};
for(int i = 0; i < 2; i++)
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = communicator.getProperties()._clone();
initData.properties.setProperty("Ice.ImplicitContext", impls[i]);
-
+
Ice.Communicator ic = Ice.Util.initialize(initData);
-
- java.util.Map ctx = new java.util.HashMap();
+
+ java.util.Map<String, String> ctx = new java.util.HashMap<String, String>();
ctx.put("one", "ONE");
ctx.put("two", "TWO");
ctx.put("three", "THREE");
-
+
Test.MyClassPrx p3 = Test.MyClassPrxHelper.uncheckedCast(
ic.stringToProxy("test:default -p 12010 -t 10000"));
-
+
ic.getImplicitContext().setContext(ctx);
test(ic.getImplicitContext().getContext().equals(ctx));
{
@@ -1591,40 +1593,40 @@ class TwowaysAMI
p3.opContext_async(cb);
test(cb.check());
}
-
+
ic.getImplicitContext().put("zero", "ZERO");
-
+
ctx = ic.getImplicitContext().getContext();
{
AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(ctx);
p3.opContext_async(cb);
test(cb.check());
}
-
- java.util.Map prxContext = new java.util.HashMap();
+
+ java.util.Map<String, String> prxContext = new java.util.HashMap<String, String>();
prxContext.put("one", "UN");
prxContext.put("four", "QUATRE");
-
- java.util.Map combined = new java.util.HashMap(ctx);
+
+ java.util.Map<String, String> combined = new java.util.HashMap<String, String>(ctx);
combined.putAll(prxContext);
test(combined.get("one").equals("UN"));
-
+
p3 = Test.MyClassPrxHelper.uncheckedCast(p3.ice_context(prxContext));
-
+
ic.getImplicitContext().setContext(null);
{
AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(prxContext);
p3.opContext_async(cb);
test(cb.check());
}
-
+
ic.getImplicitContext().setContext(ctx);
{
AMI_MyClass_opContextEqualI cb = new AMI_MyClass_opContextEqualI(combined);
p3.opContext_async(cb);
test(cb.check());
}
-
+
ic.destroy();
}
}
diff --git a/java/test/Ice/operations/build.xml b/java/test/Ice/operations/build.xml
index 43c27a68151..068a8f29aa0 100644
--- a/java/test/Ice/operations/build.xml
+++ b/java/test/Ice/operations/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/operationsAMD/MyDerivedClassI.java b/java/test/Ice/operationsAMD/MyDerivedClassI.java
index 797b383c4b7..8bf90b58dec 100644
--- a/java/test/Ice/operationsAMD/MyDerivedClassI.java
+++ b/java/test/Ice/operationsAMD/MyDerivedClassI.java
@@ -127,11 +127,11 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
public void
opByteBoolD_async(Test.AMD_MyClass_opByteBoolD cb,
- java.util.Map p1, java.util.Map p2,
+ java.util.Map<Byte, Boolean> p1, java.util.Map<Byte, Boolean> p2,
Ice.Current current)
{
- java.util.Map p3 = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<Byte, Boolean> p3 = p1;
+ java.util.Map<Byte, Boolean> r = new java.util.HashMap<Byte, Boolean>();
r.putAll(p1);
r.putAll(p2);
cb.ice_response(r, p3);
@@ -218,11 +218,11 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
public void
opLongFloatD_async(Test.AMD_MyClass_opLongFloatD cb,
- java.util.Map p1, java.util.Map p2,
+ java.util.Map<Long, Float> p1, java.util.Map<Long, Float> p2,
Ice.Current current)
{
- java.util.Map p3 = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<Long, Float> p3 = p1;
+ java.util.Map<Long, Float> r = new java.util.HashMap<Long, Float>();
r.putAll(p1);
r.putAll(p2);
cb.ice_response(r, p3);
@@ -249,11 +249,11 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
public void
opShortIntD_async(Test.AMD_MyClass_opShortIntD cb,
- java.util.Map p1, java.util.Map p2,
+ java.util.Map<Short, Integer> p1, java.util.Map<Short, Integer> p2,
Ice.Current current)
{
- java.util.Map p3 = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<Short, Integer> p3 = p1;
+ java.util.Map<Short, Integer> r = new java.util.HashMap<Short, Integer>();
r.putAll(p1);
r.putAll(p2);
cb.ice_response(r, p3);
@@ -311,11 +311,11 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
public void
opStringMyEnumD_async(Test.AMD_MyClass_opStringMyEnumD cb,
- java.util.Map p1, java.util.Map p2,
+ java.util.Map<String, Test.MyEnum> p1, java.util.Map<String, Test.MyEnum> p2,
Ice.Current current)
{
- java.util.Map p3 = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<String, Test.MyEnum> p3 = p1;
+ java.util.Map<String, Test.MyEnum> r = new java.util.HashMap<String, Test.MyEnum>();
r.putAll(p1);
r.putAll(p2);
cb.ice_response(r, p3);
@@ -409,11 +409,11 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
public void
opStringStringD_async(Test.AMD_MyClass_opStringStringD cb,
- java.util.Map p1, java.util.Map p2,
+ java.util.Map<String, String> p1, java.util.Map<String, String> p2,
Ice.Current current)
{
- java.util.Map p3 = p1;
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<String, String> p3 = p1;
+ java.util.Map<String, String> r = new java.util.HashMap<String, String>();
r.putAll(p1);
r.putAll(p2);
cb.ice_response(r, p3);
diff --git a/java/test/Ice/operationsAMD/build.xml b/java/test/Ice/operationsAMD/build.xml
index f7180ad7e15..2a75a514eb3 100644
--- a/java/test/Ice/operationsAMD/build.xml
+++ b/java/test/Ice/operationsAMD/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/package/build.xml b/java/test/Ice/package/build.xml
index b3d6435200f..a17b4c6de31 100644
--- a/java/test/Ice/package/build.xml
+++ b/java/test/Ice/package/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/proxy/AllTests.java b/java/test/Ice/proxy/AllTests.java
index 1f99253e451..62598767cd1 100644
--- a/java/test/Ice/proxy/AllTests.java
+++ b/java/test/Ice/proxy/AllTests.java
@@ -401,9 +401,9 @@ public class AllTests
test(!compObj.ice_router(null).equals(compObj.ice_router(rtr2)));
test(!compObj.ice_router(rtr1).equals(compObj.ice_router(rtr2)));
- java.util.Map ctx1 = new java.util.HashMap();
+ java.util.Map<String, String> ctx1 = new java.util.HashMap<String, String>();
ctx1.put("ctx1", "v1");
- java.util.Map ctx2 = new java.util.HashMap();
+ java.util.Map<String, String> ctx2 = new java.util.HashMap<String, String>();
ctx2.put("ctx2", "v2");
test(compObj.ice_context(null).equals(compObj.ice_context(null)));
test(compObj.ice_context(ctx1).equals(compObj.ice_context(ctx1)));
@@ -451,14 +451,14 @@ public class AllTests
System.out.print("testing checked cast with context... ");
System.out.flush();
- java.util.Map c = cl.getContext();
+ java.util.Map<String, String> c = cl.getContext();
test(c == null || c.size() == 0);
- c = new java.util.HashMap();
+ c = new java.util.HashMap<String, String>();
c.put("one", "hello");
c.put("two", "world");
cl = Test.MyClassPrxHelper.checkedCast(base, c);
- java.util.Map c2 = cl.getContext();
+ java.util.Map<String, String> c2 = cl.getContext();
test(c.equals(c2));
System.out.println("ok");
diff --git a/java/test/Ice/proxy/MyDerivedClassI.java b/java/test/Ice/proxy/MyDerivedClassI.java
index 6abb2513be0..9a1f0eac2dc 100644
--- a/java/test/Ice/proxy/MyDerivedClassI.java
+++ b/java/test/Ice/proxy/MyDerivedClassI.java
@@ -26,7 +26,7 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
c.adapter.getCommunicator().shutdown();
}
- public java.util.Map
+ public java.util.Map<String, String>
getContext(Ice.Current current)
{
return _ctx;
@@ -39,5 +39,5 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
return super.ice_isA(s, current);
}
- private java.util.Map _ctx;
+ private java.util.Map<String, String> _ctx;
}
diff --git a/java/test/Ice/proxy/build.xml b/java/test/Ice/proxy/build.xml
index 43c27a68151..068a8f29aa0 100644
--- a/java/test/Ice/proxy/build.xml
+++ b/java/test/Ice/proxy/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/proxyAMD/MyDerivedClassI.java b/java/test/Ice/proxyAMD/MyDerivedClassI.java
index ed26eb13dd1..17b8568ff75 100644
--- a/java/test/Ice/proxyAMD/MyDerivedClassI.java
+++ b/java/test/Ice/proxyAMD/MyDerivedClassI.java
@@ -43,5 +43,5 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
return super.ice_isA(s, current);
}
- private java.util.Map _ctx;
+ private java.util.Map<String, String> _ctx;
}
diff --git a/java/test/Ice/proxyAMD/build.xml b/java/test/Ice/proxyAMD/build.xml
index f7180ad7e15..2a75a514eb3 100644
--- a/java/test/Ice/proxyAMD/build.xml
+++ b/java/test/Ice/proxyAMD/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/retry/build.xml b/java/test/Ice/retry/build.xml
index 42ac2421bf4..24f509d9018 100644
--- a/java/test/Ice/retry/build.xml
+++ b/java/test/Ice/retry/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/servantLocator/build.xml b/java/test/Ice/servantLocator/build.xml
index d2ec133f1b1..32603542b19 100644
--- a/java/test/Ice/servantLocator/build.xml
+++ b/java/test/Ice/servantLocator/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/servantLocatorAMD/build.xml b/java/test/Ice/servantLocatorAMD/build.xml
index cea3fc2df58..d54925b3900 100644
--- a/java/test/Ice/servantLocatorAMD/build.xml
+++ b/java/test/Ice/servantLocatorAMD/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/slicing/exceptions/build.xml b/java/test/Ice/slicing/exceptions/build.xml
index 747e7db737e..a8652fe307e 100644
--- a/java/test/Ice/slicing/exceptions/build.xml
+++ b/java/test/Ice/slicing/exceptions/build.xml
@@ -56,20 +56,20 @@
<mkdir dir="${cclass.dir}"/>
<javac srcdir="${cgen.dir}" destdir="${cclass.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="${csrc.dir}" destdir="${cclass.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="${cgen.dir}/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<mkdir dir="${sclass.dir}"/>
<javac srcdir="${sgen.dir}" destdir="${sclass.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="${ssrc.dir}" destdir="${sclass.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="${sgen.dir}/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/slicing/exceptionsAMD/build.xml b/java/test/Ice/slicing/exceptionsAMD/build.xml
index ec0a0ad31dc..7f4e950c579 100644
--- a/java/test/Ice/slicing/exceptionsAMD/build.xml
+++ b/java/test/Ice/slicing/exceptionsAMD/build.xml
@@ -34,11 +34,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/slicing/objects/build.xml b/java/test/Ice/slicing/objects/build.xml
index cd454b858bb..2d70cdf178e 100644
--- a/java/test/Ice/slicing/objects/build.xml
+++ b/java/test/Ice/slicing/objects/build.xml
@@ -62,20 +62,20 @@
<mkdir dir="${cclass.dir}"/>
<javac srcdir="${cgen.dir}" destdir="${cclass.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="${csrc.dir}" destdir="${cclass.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="${cgen.dir}/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<mkdir dir="${sclass.dir}"/>
<javac srcdir="${sgen.dir}" destdir="${sclass.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="${ssrc.dir}" destdir="${sclass.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="${sgen.dir}/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/slicing/objects/csrc/AllTests.java b/java/test/Ice/slicing/objects/csrc/AllTests.java
index 3e3853b3f95..e47f68d1486 100644
--- a/java/test/Ice/slicing/objects/csrc/AllTests.java
+++ b/java/test/Ice/slicing/objects/csrc/AllTests.java
@@ -744,7 +744,7 @@ public class AllTests
private static class AMI_Test_dictionaryTestI extends AMI_TestIntf_dictionaryTest
{
public void
- ice_response(java.util.Map r, java.util.Map bout)
+ ice_response(java.util.Map<Integer, B> r, java.util.Map<Integer, B> bout)
{
this.r = r;
this.bout = bout;
@@ -771,8 +771,8 @@ public class AllTests
private Callback callback = new Callback();
- public java.util.Map r;
- public java.util.Map bout;
+ public java.util.Map<Integer, B> r;
+ public java.util.Map<Integer, B> bout;
}
private static class AMI_Test_throwBaseAsBaseI extends AMI_TestIntf_throwBaseAsBase
@@ -2053,9 +2053,9 @@ public class AllTests
{
try
{
- java.util.IdentityHashMap bin = new java.util.IdentityHashMap();
+ java.util.IdentityHashMap<Integer, B> bin = new java.util.IdentityHashMap<Integer, B>();
BDictHolder bout = new BDictHolder();
- java.util.Map r;
+ java.util.Map<Integer, B> r;
int i;
for(i = 0; i < 10; ++i)
{
@@ -2064,7 +2064,7 @@ public class AllTests
d1.sb = s;
d1.pb = d1;
d1.sd1 = s;
- bin.put(new Integer(i), d1);
+ bin.put(i, d1);
}
r = test.dictionaryTest(bin, bout);
@@ -2072,7 +2072,7 @@ public class AllTests
test(bout.value.size() == 10);
for(i = 0; i < 10; ++i)
{
- B b = (B)bout.value.get(new Integer(i * 10));
+ B b = bout.value.get(i * 10);
test(b != null);
String s = "D1." + new Integer(i).toString();
test(b.sb.equals(s));
@@ -2085,11 +2085,11 @@ public class AllTests
test(r.size() == 10);
for(i = 0; i < 10; ++i)
{
- B b = (B)r.get(new Integer(i * 20));
+ B b = r.get(i * 20);
test(b != null);
String s = "D1." + new Integer(i * 20).toString();
test(b.sb.equals(s));
- test(b.pb == (i == 0 ? (B)null : (B)r.get(new Integer((i - 1) * 20))));
+ test(b.pb == (i == 0 ? null : r.get((i - 1) * 20)));
D1 d1 = (D1)b;
test(d1 != null);
test(d1.sd1.equals(s));
@@ -2106,9 +2106,9 @@ public class AllTests
System.out.print("dictionary slicing (AMI)... ");
System.out.flush();
{
- java.util.Map bin = new java.util.HashMap();
- java.util.Map bout;
- java.util.Map r;
+ java.util.Map<Integer, B> bin = new java.util.HashMap<Integer, B>();
+ java.util.Map<Integer, B> bout;
+ java.util.Map<Integer, B> r;
int i;
for(i = 0; i < 10; ++i)
{
@@ -2117,7 +2117,7 @@ public class AllTests
d1.sb = s;
d1.pb = d1;
d1.sd1 = s;
- bin.put(new Integer(i), d1);
+ bin.put(i, d1);
}
AMI_Test_dictionaryTestI cb = new AMI_Test_dictionaryTestI();
@@ -2129,7 +2129,7 @@ public class AllTests
test(bout.size() == 10);
for(i = 0; i < 10; ++i)
{
- B b = (B)bout.get(new Integer(i * 10));
+ B b = bout.get(i * 10);
test(b != null);
String s = "D1." + new Integer(i).toString();
test(b.sb.equals(s));
@@ -2142,11 +2142,11 @@ public class AllTests
test(r.size() == 10);
for(i = 0; i < 10; ++i)
{
- B b = (B)r.get(new Integer(i * 20));
+ B b = r.get(i * 20);
test(b != null);
String s = "D1." + new Integer(i * 20).toString();
test(b.sb.equals(s));
- test(b.pb == (i == 0 ? (B)null : (B)r.get(new Integer((i - 1) * 20))));
+ test(b.pb == (i == 0 ? null : r.get((i - 1) * 20)));
D1 d1 = (D1)b;
test(d1 != null);
test(d1.sd1.equals(s));
diff --git a/java/test/Ice/slicing/objects/ssrc/TestI.java b/java/test/Ice/slicing/objects/ssrc/TestI.java
index 4626253d3ba..ec190f5ca18 100644
--- a/java/test/Ice/slicing/objects/ssrc/TestI.java
+++ b/java/test/Ice/slicing/objects/ssrc/TestI.java
@@ -243,31 +243,31 @@ public final class TestI extends _TestIntfDisp
return ss;
}
- public java.util.Map
- dictionaryTest(java.util.Map bin, BDictHolder bout, Ice.Current current)
+ public java.util.Map<Integer, B>
+ dictionaryTest(java.util.Map<Integer, B> bin, BDictHolder bout, Ice.Current current)
{
- bout.value = new java.util.HashMap();
+ bout.value = new java.util.HashMap<Integer, B>();
int i;
for(i = 0; i < 10; ++i)
{
- B b = (B)bin.get(new Integer(i));
+ B b = bin.get(i);
D2 d2 = new D2();
d2.sb = b.sb;
d2.pb = b.pb;
d2.sd2 = "D2";
d2.pd2 = d2;
- bout.value.put(new Integer(i * 10), d2);
+ bout.value.put(i * 10, d2);
}
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<Integer, B> r = new java.util.HashMap<Integer, B>();
for(i = 0; i < 10; ++i)
{
String s = "D1." + new Integer(i * 20).toString();
D1 d1 = new D1();
d1.sb = s;
- d1.pb = (i == 0 ? (B)null : (B)r.get(new Integer((i - 1) * 20)));
+ d1.pb = (i == 0 ? null : r.get((i - 1) * 20));
d1.sd1 = s;
d1.pd1 = d1;
- r.put(new Integer(i * 20), d1);
+ r.put(i * 20, d1);
}
return r;
}
diff --git a/java/test/Ice/slicing/objectsAMD/TestI.java b/java/test/Ice/slicing/objectsAMD/TestI.java
index e9137e3bc20..035f2ec6a44 100644
--- a/java/test/Ice/slicing/objectsAMD/TestI.java
+++ b/java/test/Ice/slicing/objectsAMD/TestI.java
@@ -266,30 +266,30 @@ public final class TestI extends _TestIntfDisp
}
public void
- dictionaryTest_async(AMD_TestIntf_dictionaryTest cb, java.util.Map bin, Ice.Current current)
+ dictionaryTest_async(AMD_TestIntf_dictionaryTest cb, java.util.Map<Integer, B> bin, Ice.Current current)
{
- java.util.Map bout = new java.util.HashMap();
+ java.util.Map<Integer, B> bout = new java.util.HashMap<Integer, B>();
int i;
for(i = 0; i < 10; ++i)
{
- B b = (B)bin.get(new Integer(i));
+ B b = bin.get(i);
D2 d2 = new D2();
d2.sb = b.sb;
d2.pb = b.pb;
d2.sd2 = "D2";
d2.pd2 = d2;
- bout.put(new Integer(i * 10), d2);
+ bout.put(i * 10, d2);
}
- java.util.Map r = new java.util.HashMap();
+ java.util.Map<Integer, B> r = new java.util.HashMap<Integer, B>();
for(i = 0; i < 10; ++i)
{
String s = "D1." + new Integer(i * 20).toString();
D1 d1 = new D1();
d1.sb = s;
- d1.pb = (i == 0 ? (B)null : (B)r.get(new Integer((i - 1) * 20)));
+ d1.pb = (i == 0 ? null : r.get((i - 1) * 20));
d1.sd1 = s;
d1.pd1 = d1;
- r.put(new Integer(i * 20), d1);
+ r.put(i * 20, d1);
}
cb.ice_response(r, bout);
}
diff --git a/java/test/Ice/slicing/objectsAMD/build.xml b/java/test/Ice/slicing/objectsAMD/build.xml
index cbfa82aa2a5..2d9e6fe532b 100644
--- a/java/test/Ice/slicing/objectsAMD/build.xml
+++ b/java/test/Ice/slicing/objectsAMD/build.xml
@@ -35,11 +35,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/stream/Client.java b/java/test/Ice/stream/Client.java
index 0ae251fa00b..62b3374246c 100644
--- a/java/test/Ice/stream/Client.java
+++ b/java/test/Ice/stream/Client.java
@@ -434,7 +434,7 @@ public class Client
arr[i].seq8 = new String[] { "string1", "string2", "string3", "string4" };
arr[i].seq9 = new Test.MyEnum[] { Test.MyEnum.enum3, Test.MyEnum.enum2, Test.MyEnum.enum1 };
arr[i].seq10 = new Test.MyClass[4]; // null elements.
- arr[i].d = new java.util.HashMap();
+ arr[i].d = new java.util.HashMap<String, Test.MyClass>();
arr[i].d.put("hi", arr[i]);
}
out = Ice.Util.createOutputStream(communicator);
diff --git a/java/test/Ice/stream/build.xml b/java/test/Ice/stream/build.xml
index 2c66490b593..ed11465d398 100644
--- a/java/test/Ice/stream/build.xml
+++ b/java/test/Ice/stream/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/threads/AllTests.java b/java/test/Ice/threads/AllTests.java
index e8af45a5e33..0885c4f1306 100644
--- a/java/test/Ice/threads/AllTests.java
+++ b/java/test/Ice/threads/AllTests.java
@@ -279,8 +279,8 @@ public class AllTests
System.out.flush();
{
Test.AdapterPrx[] adapters = server.getAdapters();
- java.util.Set threadPerConnectionThreads = new java.util.HashSet();
- java.util.Set threadPoolThreads = new java.util.HashSet();
+ java.util.Set<Integer> threadPerConnectionThreads = new java.util.HashSet<Integer>();
+ java.util.Set<Integer> threadPoolThreads = new java.util.HashSet<Integer>();
for(int i = 0; i < adapters.length; ++i)
{
@@ -301,7 +301,7 @@ public class AllTests
test(!cb.notified());
test(tid == cb.id()); // The thread id must be the same for both requests.
test(!threadPerConnectionThreads.contains(new Integer(tid)));
- threadPerConnectionThreads.add(new Integer(tid));
+ threadPerConnectionThreads.add(tid);
//
// Closing the connection and creating a new one should start a new thread
@@ -310,8 +310,8 @@ public class AllTests
adapter.ice_getConnection().close(false);
int tid2 = adapter.getThreadId();
test(tid != tid2);
- test(!threadPerConnectionThreads.contains(new Integer(tid2)));
- threadPerConnectionThreads.add(new Integer(tid2));
+ test(!threadPerConnectionThreads.contains(tid2));
+ threadPerConnectionThreads.add(tid2);
}
else
{
@@ -324,8 +324,8 @@ public class AllTests
test(tid != cb.id()); // The thread ids must be different for the requests.
test(!threadPoolThreads.contains(new Integer(tid)));
threadPoolThreads.add(new Integer(tid));
- test(!threadPoolThreads.contains(new Integer(cb.id())));
- threadPoolThreads.add(new Integer(cb.id()));
+ test(!threadPoolThreads.contains(cb.id()));
+ threadPoolThreads.add(cb.id());
}
}
}
diff --git a/java/test/Ice/threads/ThreadHookI.java b/java/test/Ice/threads/ThreadHookI.java
index e055a513ecc..189f956d329 100644
--- a/java/test/Ice/threads/ThreadHookI.java
+++ b/java/test/Ice/threads/ThreadHookI.java
@@ -19,7 +19,7 @@ class ThreadHookI implements Ice.ThreadNotification
{
test(getThreadNumInternal() == -1);
Thread t = Thread.currentThread();
- _threads.put(t, new Integer(_nextThreadId));
+ _threads.put(t, _nextThreadId);
_nextThreadId++;
}
@@ -47,7 +47,7 @@ class ThreadHookI implements Ice.ThreadNotification
getThreadNumInternal()
{
Thread t = Thread.currentThread();
- Integer i = (Integer)_threads.get(t);
+ Integer i = _threads.get(t);
if(i == null)
{
return -1;
@@ -67,6 +67,6 @@ class ThreadHookI implements Ice.ThreadNotification
}
}
- private java.util.Map _threads = new java.util.HashMap();
+ private java.util.Map<Thread, Integer> _threads = new java.util.HashMap<Thread, Integer>();
private int _nextThreadId;
}
diff --git a/java/test/Ice/threads/build.xml b/java/test/Ice/threads/build.xml
index 43c27a68151..068a8f29aa0 100644
--- a/java/test/Ice/threads/build.xml
+++ b/java/test/Ice/threads/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/timeout/build.xml b/java/test/Ice/timeout/build.xml
index 29c622bdf4d..b3ddf10a141 100644
--- a/java/test/Ice/timeout/build.xml
+++ b/java/test/Ice/timeout/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Ice/translator/build.xml b/java/test/Ice/translator/build.xml
index 1e0e92e15db..c2981cb83f0 100644
--- a/java/test/Ice/translator/build.xml
+++ b/java/test/Ice/translator/build.xml
@@ -70,11 +70,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}" classpath="${lib.dir}" excludes="generated/**"
debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="${generated.dir}" destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/IceBox/configuration/build.xml b/java/test/IceBox/configuration/build.xml
index 09a2091d164..95b5d911c69 100644
--- a/java/test/IceBox/configuration/build.xml
+++ b/java/test/IceBox/configuration/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/IceGrid/simple/build.xml b/java/test/IceGrid/simple/build.xml
index 727b218e84a..700839e3502 100644
--- a/java/test/IceGrid/simple/build.xml
+++ b/java/test/IceGrid/simple/build.xml
@@ -30,11 +30,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/IceSSL/configuration/AllTests.java b/java/test/IceSSL/configuration/AllTests.java
index aed291d2445..a900b6b604e 100644
--- a/java/test/IceSSL/configuration/AllTests.java
+++ b/java/test/IceSSL/configuration/AllTests.java
@@ -46,10 +46,10 @@ public class AllTests
return result;
}
- private static java.util.Map
+ private static java.util.Map<String, String>
createServerProps(Ice.Properties defaultProperties, String defaultDir, String defaultHost)
{
- java.util.Map result = new java.util.HashMap();
+ java.util.Map<String, String> result = new java.util.HashMap<String, String>();
result.put("Ice.Plugin.IceSSL", "IceSSL.PluginFactory");
if(defaultProperties.getPropertyAsInt("Ice.ThreadPerConnection") > 0)
{
@@ -114,7 +114,7 @@ public class AllTests
Ice.ObjectPrx obj = comm.stringToProxy(factoryRef);
test(obj != null);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(obj);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Ciphers", "NONE (.*DH_anon.*)");
d.put("IceSSL.VerifyPeer", "0");
Test.ServerPrx server = fact.createServer(d);
@@ -143,7 +143,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -452,7 +452,7 @@ public class AllTests
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Ciphers", "NONE (.*DH_anon.*)");
d.put("IceSSL.VerifyPeer", "0");
Test.ServerPrx server = fact.createServer(d);
@@ -512,7 +512,7 @@ public class AllTests
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -563,7 +563,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -629,7 +629,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_ca1_exp.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -698,7 +698,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_ca2.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacerts.jks");
@@ -822,7 +822,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -853,7 +853,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -943,7 +943,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -982,7 +982,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Alias", "rsacert");
d.put("IceSSL.Password", "password");
@@ -1024,7 +1024,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1049,7 +1049,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1077,7 +1077,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1102,7 +1102,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1129,7 +1129,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1154,7 +1154,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1181,7 +1181,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1207,7 +1207,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1234,7 +1234,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.TrustOnly",
"C=US, ST=Florida, O=ZeroC\\, Inc.,OU=Ice, emailAddress=info@zeroc.com, CN=Client");
d.put("IceSSL.Ciphers", "NONE (.*DH_anon.*)");
@@ -1266,7 +1266,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1295,7 +1295,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1327,7 +1327,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1354,7 +1354,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1384,7 +1384,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
@@ -1412,7 +1412,7 @@ public class AllTests
Ice.Communicator comm = Ice.Util.initialize(args, initData);
Test.ServerFactoryPrx fact = Test.ServerFactoryPrxHelper.checkedCast(comm.stringToProxy(factoryRef));
test(fact != null);
- java.util.Map d = createServerProps(defaultProperties, defaultDir, defaultHost);
+ java.util.Map<String, String> d = createServerProps(defaultProperties, defaultDir, defaultHost);
d.put("IceSSL.Keystore", "s_rsa_dsa_ca1.jks");
d.put("IceSSL.Password", "password");
d.put("IceSSL.Truststore", "cacert1.jks");
diff --git a/java/test/IceSSL/configuration/CertificateVerifierI.java b/java/test/IceSSL/configuration/CertificateVerifierI.java
index aa598e8d0bf..f1c0c440d13 100644
--- a/java/test/IceSSL/configuration/CertificateVerifierI.java
+++ b/java/test/IceSSL/configuration/CertificateVerifierI.java
@@ -22,15 +22,15 @@ public class CertificateVerifierI implements IceSSL.CertificateVerifier
{
try
{
- java.util.Collection subjectAltNames =
+ java.util.Collection<java.util.List<?> > subjectAltNames =
((java.security.cert.X509Certificate)info.certs[0]).getSubjectAlternativeNames();
test(subjectAltNames != null);
- java.util.ArrayList ipAddresses = new java.util.ArrayList();
- java.util.ArrayList dnsNames = new java.util.ArrayList();
- java.util.Iterator i = subjectAltNames.iterator();
+ java.util.List<String> ipAddresses = new java.util.ArrayList<String>();
+ java.util.List<String> dnsNames = new java.util.ArrayList<String>();
+ java.util.Iterator<java.util.List<?> > i = subjectAltNames.iterator();
while(i.hasNext())
{
- java.util.List l = (java.util.List)i.next();
+ java.util.List<?> l = i.next();
test(!l.isEmpty());
Integer n = (Integer)l.get(0);
if(n.intValue() == 7)
diff --git a/java/test/IceSSL/configuration/ServerFactoryI.java b/java/test/IceSSL/configuration/ServerFactoryI.java
index 5889c1851b2..16de42d825a 100644
--- a/java/test/IceSSL/configuration/ServerFactoryI.java
+++ b/java/test/IceSSL/configuration/ServerFactoryI.java
@@ -19,15 +19,15 @@ class ServerFactoryI extends Test._ServerFactoryDisp
}
public Test.ServerPrx
- createServer(java.util.Map props, Ice.Current current)
+ createServer(java.util.Map<String, String> props, Ice.Current current)
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties();
- java.util.Iterator i = props.entrySet().iterator();
+ java.util.Iterator<java.util.Map.Entry<String, String> > i = props.entrySet().iterator();
while(i.hasNext())
{
- java.util.Map.Entry e = (java.util.Map.Entry)i.next();
- initData.properties.setProperty((String)e.getKey(), (String)e.getValue());
+ java.util.Map.Entry<String, String> e = i.next();
+ initData.properties.setProperty(e.getKey(), e.getValue());
}
String[] args = new String[0];
@@ -47,7 +47,7 @@ class ServerFactoryI extends Test._ServerFactoryDisp
Ice.Identity key = srv.ice_getIdentity();
if(_servers.containsKey(key))
{
- ServerI server = (ServerI)_servers.get(key);
+ ServerI server = _servers.get(key);
server.destroy();
_servers.remove(key);
}
@@ -60,5 +60,5 @@ class ServerFactoryI extends Test._ServerFactoryDisp
current.adapter.getCommunicator().shutdown();
}
- private java.util.HashMap _servers = new java.util.HashMap();
+ private java.util.Map<Ice.Identity, ServerI> _servers = new java.util.HashMap<Ice.Identity, ServerI>();
}
diff --git a/java/test/IceSSL/configuration/build.xml b/java/test/IceSSL/configuration/build.xml
index 3913d5a6fdb..fe8b86b4f1b 100644
--- a/java/test/IceSSL/configuration/build.xml
+++ b/java/test/IceSSL/configuration/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/IceUtil/inputUtil/build.xml b/java/test/IceUtil/inputUtil/build.xml
index 43c27a68151..068a8f29aa0 100644
--- a/java/test/IceUtil/inputUtil/build.xml
+++ b/java/test/IceUtil/inputUtil/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>
diff --git a/java/test/Slice/keyword/build.xml b/java/test/Slice/keyword/build.xml
index 2731e51083a..639654e8392 100644
--- a/java/test/Slice/keyword/build.xml
+++ b/java/test/Slice/keyword/build.xml
@@ -33,11 +33,11 @@
<mkdir dir="${class.dir}"/>
<javac srcdir="${generated.dir}" destdir="${class.dir}"
source="${jdk.version}" classpath="${lib.dir}" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
<javac srcdir="." destdir="${class.dir}" source="${jdk.version}"
classpath="${lib.dir}" excludes="generated/**" debug="${debug}">
- <compilerarg value="${javac.lint}" compiler="${javac.lint.compiler}"/>
+ <compilerarg value="${javac.lint}"/>
</javac>
</target>