summaryrefslogtreecommitdiff
path: root/java/test
diff options
context:
space:
mode:
Diffstat (limited to 'java/test')
-rw-r--r--java/test/Freeze/evictor/RemoteEvictorFactoryI.java2
-rw-r--r--java/test/Freeze/evictor/RemoteEvictorI.java2
-rw-r--r--java/test/Freeze/evictor/Server.java2
-rw-r--r--java/test/Glacier2/router/CallbackClient.java6
-rw-r--r--java/test/Glacier2/router/CallbackServer.java8
-rw-r--r--java/test/Ice/binding/RemoteObjectAdapterI.java3
-rw-r--r--java/test/Ice/binding/Server.java2
-rw-r--r--java/test/Ice/checksum/server/Server.java2
-rw-r--r--java/test/Ice/custom/Collocated.java2
-rw-r--r--java/test/Ice/custom/Server.java2
-rw-r--r--java/test/Ice/exceptions/AllTests.java22
-rw-r--r--java/test/Ice/exceptions/Collocated.java2
-rw-r--r--java/test/Ice/exceptions/Server.java2
-rw-r--r--java/test/Ice/exceptionsAMD/Server.java2
-rw-r--r--java/test/Ice/facets/AllTests.java26
-rw-r--r--java/test/Ice/facets/Collocated.java8
-rw-r--r--java/test/Ice/facets/Server.java8
-rw-r--r--java/test/Ice/faultTolerance/Server.java2
-rw-r--r--java/test/Ice/hold/Server.java2
-rw-r--r--java/test/Ice/inheritance/Collocated.java2
-rw-r--r--java/test/Ice/inheritance/Server.java2
-rw-r--r--java/test/Ice/location/AllTests.java2
-rw-r--r--java/test/Ice/location/Server.java8
-rw-r--r--java/test/Ice/location/ServerManagerI.java4
-rw-r--r--java/test/Ice/location/TestI.java9
-rw-r--r--java/test/Ice/objects/Collocated.java2
-rw-r--r--java/test/Ice/objects/Server.java2
-rw-r--r--java/test/Ice/operations/AllTests.java4
-rw-r--r--java/test/Ice/operations/Collocated.java4
-rw-r--r--java/test/Ice/operations/MyDerivedClassI.java2
-rw-r--r--java/test/Ice/operations/Server.java4
-rw-r--r--java/test/Ice/operations/Twoways.java6
-rw-r--r--java/test/Ice/operations/TwowaysAMI.java14
-rw-r--r--java/test/Ice/operationsAMD/MyDerivedClassI.java2
-rw-r--r--java/test/Ice/operationsAMD/Server.java4
-rw-r--r--java/test/Ice/package/Server.java2
-rw-r--r--java/test/Ice/retry/Server.java2
-rw-r--r--java/test/Ice/slicing/exceptionsAMD/Server.java2
-rw-r--r--java/test/Ice/slicing/objectsAMD/Server.java2
-rw-r--r--java/test/Ice/timeout/Server.java2
-rw-r--r--java/test/IceGrid/simple/Server.java2
-rw-r--r--java/test/IceSSL/configuration/Server.java2
42 files changed, 102 insertions, 88 deletions
diff --git a/java/test/Freeze/evictor/RemoteEvictorFactoryI.java b/java/test/Freeze/evictor/RemoteEvictorFactoryI.java
index e6b10dbf45b..f2483e4fd90 100644
--- a/java/test/Freeze/evictor/RemoteEvictorFactoryI.java
+++ b/java/test/Freeze/evictor/RemoteEvictorFactoryI.java
@@ -21,7 +21,7 @@ public final class RemoteEvictorFactoryI extends Test._RemoteEvictorFactoryDisp
{
RemoteEvictorI remoteEvictor = new RemoteEvictorI(_adapter, _envName, name);
return Test.RemoteEvictorPrxHelper.
- uncheckedCast(_adapter.add(remoteEvictor, Ice.Util.stringToIdentity(name)));
+ uncheckedCast(_adapter.add(remoteEvictor, _adapter.getCommunicator().stringToIdentity(name)));
}
public void
diff --git a/java/test/Freeze/evictor/RemoteEvictorI.java b/java/test/Freeze/evictor/RemoteEvictorI.java
index e344c9de1d4..3bf94ca3036 100644
--- a/java/test/Freeze/evictor/RemoteEvictorI.java
+++ b/java/test/Freeze/evictor/RemoteEvictorI.java
@@ -115,7 +115,7 @@ public final class RemoteEvictorI extends Test._RemoteEvictorDisp
{
_evictorAdapter.deactivate();
_evictorAdapter.waitForDeactivate();
- _adapter.remove(Ice.Util.stringToIdentity(_category));
+ _adapter.remove(_adapter.getCommunicator().stringToIdentity(_category));
}
public void
diff --git a/java/test/Freeze/evictor/Server.java b/java/test/Freeze/evictor/Server.java
index 877d9a0b1e4..b5037579877 100644
--- a/java/test/Freeze/evictor/Server.java
+++ b/java/test/Freeze/evictor/Server.java
@@ -51,7 +51,7 @@ public class Server
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("Evictor");
RemoteEvictorFactoryI factory = new RemoteEvictorFactoryI(adapter, envName);
- adapter.add(factory, Ice.Util.stringToIdentity("factory"));
+ adapter.add(factory, communicator.stringToIdentity("factory"));
Ice.ObjectFactory servantFactory = new ServantFactory();
communicator.addObjectFactory(servantFactory, "::Test::Servant");
diff --git a/java/test/Glacier2/router/CallbackClient.java b/java/test/Glacier2/router/CallbackClient.java
index b03b117db13..cb48db7111d 100644
--- a/java/test/Glacier2/router/CallbackClient.java
+++ b/java/test/Glacier2/router/CallbackClient.java
@@ -271,7 +271,7 @@ class CallbackClient extends Ice.Application
java.util.Map context = new java.util.HashMap();
context.put("_fwd", "t");
CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
- twoway.ice_identity(Ice.Util.stringToIdentity("c2/callback")));
+ twoway.ice_identity(communicator().stringToIdentity("c2/callback")));
otherCategoryTwoway.initiateCallback(twowayR, context);
test(callbackReceiverImpl.callbackOK());
System.out.println("ok");
@@ -285,7 +285,7 @@ class CallbackClient extends Ice.Application
try
{
CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
- twoway.ice_identity(Ice.Util.stringToIdentity("c3/callback")));
+ twoway.ice_identity(communicator().stringToIdentity("c3/callback")));
otherCategoryTwoway.initiateCallback(twowayR, context);
test(false);
}
@@ -301,7 +301,7 @@ class CallbackClient extends Ice.Application
java.util.Map context = new java.util.HashMap();
context.put("_fwd", "t");
CallbackPrx otherCategoryTwoway = CallbackPrxHelper.uncheckedCast(
- twoway.ice_identity(Ice.Util.stringToIdentity("_userid/callback")));
+ twoway.ice_identity(communicator().stringToIdentity("_userid/callback")));
otherCategoryTwoway.initiateCallback(twowayR, context);
test(callbackReceiverImpl.callbackOK());
System.out.println("ok");
diff --git a/java/test/Glacier2/router/CallbackServer.java b/java/test/Glacier2/router/CallbackServer.java
index 5fbdcd09645..79650ddc031 100644
--- a/java/test/Glacier2/router/CallbackServer.java
+++ b/java/test/Glacier2/router/CallbackServer.java
@@ -17,13 +17,13 @@ class CallbackServer extends Ice.Application
communicator().getProperties().setProperty("CallbackAdapter.Endpoints", "tcp -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("CallbackAdapter");
adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("c1/callback")); // The test allows "c1" as category.
+ communicator().stringToIdentity("c1/callback")); // The test allows "c1" as category.
adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("c2/callback")); // The test allows "c2" as category.
+ communicator().stringToIdentity("c2/callback")); // The test allows "c2" as category.
adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("c3/callback")); // The test rejects "c3" as category.
+ communicator().stringToIdentity("c3/callback")); // The test rejects "c3" as category.
adapter.add(new CallbackI(),
- Ice.Util.stringToIdentity("_userid/callback")); // The test allows the prefixed userid.
+ communicator().stringToIdentity("_userid/callback")); // The test allows the prefixed userid.
adapter.activate();
communicator().waitForShutdown();
return 0;
diff --git a/java/test/Ice/binding/RemoteObjectAdapterI.java b/java/test/Ice/binding/RemoteObjectAdapterI.java
index 8ec906976c1..c50fdb3dcf4 100644
--- a/java/test/Ice/binding/RemoteObjectAdapterI.java
+++ b/java/test/Ice/binding/RemoteObjectAdapterI.java
@@ -15,7 +15,8 @@ public class RemoteObjectAdapterI extends _RemoteObjectAdapterDisp
RemoteObjectAdapterI(Ice.ObjectAdapter adapter)
{
_adapter = adapter;
- _testIntf = TestIntfPrxHelper.uncheckedCast(_adapter.add(new TestI(), Ice.Util.stringToIdentity("test")));
+ _testIntf = TestIntfPrxHelper.uncheckedCast(_adapter.add(new TestI(),
+ _adapter.getCommunicator().stringToIdentity("test")));
_adapter.activate();
}
diff --git a/java/test/Ice/binding/Server.java b/java/test/Ice/binding/Server.java
index a0d6c2d3042..908c3c1d27e 100644
--- a/java/test/Ice/binding/Server.java
+++ b/java/test/Ice/binding/Server.java
@@ -14,7 +14,7 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("communicator");
+ Ice.Identity id = communicator.stringToIdentity("communicator");
adapter.add(new RemoteCommunicatorI(), id);
adapter.activate();
diff --git a/java/test/Ice/checksum/server/Server.java b/java/test/Ice/checksum/server/Server.java
index 986496f96da..e152d0680f2 100644
--- a/java/test/Ice/checksum/server/Server.java
+++ b/java/test/Ice/checksum/server/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new ChecksumI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("test"));
+ adapter.add(object, communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/custom/Collocated.java b/java/test/Ice/custom/Collocated.java
index 91d1a0aa4d3..4a698d51fca 100644
--- a/java/test/Ice/custom/Collocated.java
+++ b/java/test/Ice/custom/Collocated.java
@@ -15,7 +15,7 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object test = new TestI(communicator);
- adapter.add(test, Ice.Util.stringToIdentity("test"));
+ adapter.add(test, communicator.stringToIdentity("test"));
AllTests.allTests(communicator);
diff --git a/java/test/Ice/custom/Server.java b/java/test/Ice/custom/Server.java
index 51d5d2c607c..fe6082914bd 100644
--- a/java/test/Ice/custom/Server.java
+++ b/java/test/Ice/custom/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object test = new TestI(communicator);
- adapter.add(test, Ice.Util.stringToIdentity("test"));
+ adapter.add(test, communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/exceptions/AllTests.java b/java/test/Ice/exceptions/AllTests.java
index 4f483d6928f..c5e3287ab9d 100644
--- a/java/test/Ice/exceptions/AllTests.java
+++ b/java/test/Ice/exceptions/AllTests.java
@@ -107,6 +107,11 @@ public class AllTests
private static class AMI_Thrower_throwAasAObjectNotExistI extends AMI_Thrower_throwAasA
{
+ AMI_Thrower_throwAasAObjectNotExistI(Ice.Communicator communicator)
+ {
+ _communicator = communicator;
+ }
+
public void
ice_response()
{
@@ -122,7 +127,7 @@ public class AllTests
}
catch(Ice.ObjectNotExistException ex)
{
- Ice.Identity id = Ice.Util.stringToIdentity("does not exist");
+ Ice.Identity id = _communicator.stringToIdentity("does not exist");
test(ex.id.equals(id));
}
catch(Exception ex)
@@ -147,6 +152,7 @@ public class AllTests
}
private Callback callback = new Callback();
+ private Ice.Communicator _communicator;
}
private static class AMI_Thrower_throwAasAFacetNotExistI extends AMI_Thrower_throwAasA
@@ -744,20 +750,20 @@ public class AllTests
System.out.print("testing servant registration exceptions... ");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter1");
Ice.Object obj = new EmptyI();
- adapter.add(obj, Ice.Util.stringToIdentity("x"));
+ adapter.add(obj, communicator.stringToIdentity("x"));
try
{
- adapter.add(obj, Ice.Util.stringToIdentity("x"));
+ adapter.add(obj, communicator.stringToIdentity("x"));
test(false);
}
catch(Ice.AlreadyRegisteredException ex)
{
}
- adapter.remove(Ice.Util.stringToIdentity("x"));
+ adapter.remove(communicator.stringToIdentity("x"));
try
{
- adapter.remove(Ice.Util.stringToIdentity("x"));
+ adapter.remove(communicator.stringToIdentity("x"));
test(false);
}
catch(Ice.NotRegisteredException ex)
@@ -1081,7 +1087,7 @@ public class AllTests
System.out.flush();
{
- Ice.Identity id = Ice.Util.stringToIdentity("does not exist");
+ Ice.Identity id = communicator.stringToIdentity("does not exist");
try
{
ThrowerPrx thrower2 = ThrowerPrxHelper.uncheckedCast(thrower.ice_identity(id));
@@ -1313,9 +1319,9 @@ public class AllTests
System.out.flush();
{
- Ice.Identity id = Ice.Util.stringToIdentity("does not exist");
+ Ice.Identity id = communicator.stringToIdentity("does not exist");
ThrowerPrx thrower2 = ThrowerPrxHelper.uncheckedCast(thrower.ice_identity(id));
- AMI_Thrower_throwAasAObjectNotExistI cb = new AMI_Thrower_throwAasAObjectNotExistI();
+ AMI_Thrower_throwAasAObjectNotExistI cb = new AMI_Thrower_throwAasAObjectNotExistI(communicator);
thrower2.throwAasA_async(cb, 1);
test(cb.check());
}
diff --git a/java/test/Ice/exceptions/Collocated.java b/java/test/Ice/exceptions/Collocated.java
index 2451a4df821..e66910ef1a9 100644
--- a/java/test/Ice/exceptions/Collocated.java
+++ b/java/test/Ice/exceptions/Collocated.java
@@ -15,7 +15,7 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new ThrowerI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("thrower"));
+ adapter.add(object, communicator.stringToIdentity("thrower"));
AllTests.allTests(communicator, true);
diff --git a/java/test/Ice/exceptions/Server.java b/java/test/Ice/exceptions/Server.java
index 19b8f86a150..16aceacb26e 100644
--- a/java/test/Ice/exceptions/Server.java
+++ b/java/test/Ice/exceptions/Server.java
@@ -18,7 +18,7 @@ public class Server
properties.setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new ThrowerI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("thrower"));
+ adapter.add(object, communicator.stringToIdentity("thrower"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/exceptionsAMD/Server.java b/java/test/Ice/exceptionsAMD/Server.java
index be5e6b6f7df..145d755516c 100644
--- a/java/test/Ice/exceptionsAMD/Server.java
+++ b/java/test/Ice/exceptionsAMD/Server.java
@@ -18,7 +18,7 @@ public class Server
properties.setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new ThrowerI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("thrower"));
+ adapter.add(object, communicator.stringToIdentity("thrower"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/facets/AllTests.java b/java/test/Ice/facets/AllTests.java
index 9a158a54928..0afcf68b445 100644
--- a/java/test/Ice/facets/AllTests.java
+++ b/java/test/Ice/facets/AllTests.java
@@ -26,20 +26,20 @@ public class AllTests
System.out.print("testing facet registration exceptions... ");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("FacetExceptionTestAdapter");
Ice.Object obj = new EmptyI();
- adapter.add(obj, Ice.Util.stringToIdentity("d"));
- adapter.addFacet(obj, Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.add(obj, communicator.stringToIdentity("d"));
+ adapter.addFacet(obj, communicator.stringToIdentity("d"), "facetABCD");
try
{
- adapter.addFacet(obj, Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.addFacet(obj, communicator.stringToIdentity("d"), "facetABCD");
test(false);
}
catch(Ice.AlreadyRegisteredException ex)
{
}
- adapter.removeFacet(Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.removeFacet(communicator.stringToIdentity("d"), "facetABCD");
try
{
- adapter.removeFacet(Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.removeFacet(communicator.stringToIdentity("d"), "facetABCD");
test(false);
}
catch(Ice.NotRegisteredException ex)
@@ -50,25 +50,25 @@ public class AllTests
System.out.print("testing removeAllFacets... ");
Ice.Object obj1 = new EmptyI();
Ice.Object obj2 = new EmptyI();
- adapter.addFacet(obj1, Ice.Util.stringToIdentity("id1"), "f1");
- adapter.addFacet(obj2, Ice.Util.stringToIdentity("id1"), "f2");
+ adapter.addFacet(obj1, communicator.stringToIdentity("id1"), "f1");
+ adapter.addFacet(obj2, communicator.stringToIdentity("id1"), "f2");
Ice.Object obj3 = new EmptyI();
- adapter.addFacet(obj1, Ice.Util.stringToIdentity("id2"), "f1");
- adapter.addFacet(obj2, Ice.Util.stringToIdentity("id2"), "f2");
- adapter.addFacet(obj3, Ice.Util.stringToIdentity("id2"), "");
- java.util.Map fm = adapter.removeAllFacets(Ice.Util.stringToIdentity("id1"));
+ 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"));
test(fm.size() == 2);
test(fm.get("f1") == obj1);
test(fm.get("f2") == obj2);
try
{
- adapter.removeAllFacets(Ice.Util.stringToIdentity("id1"));
+ adapter.removeAllFacets(communicator.stringToIdentity("id1"));
test(false);
}
catch(Ice.NotRegisteredException ex)
{
}
- fm = adapter.removeAllFacets(Ice.Util.stringToIdentity("id2"));
+ fm = adapter.removeAllFacets(communicator.stringToIdentity("id2"));
test(fm.size() == 3);
test(fm.get("f1") == obj1);
test(fm.get("f2") == obj2);
diff --git a/java/test/Ice/facets/Collocated.java b/java/test/Ice/facets/Collocated.java
index 69edf7732dc..57dae86829f 100644
--- a/java/test/Ice/facets/Collocated.java
+++ b/java/test/Ice/facets/Collocated.java
@@ -15,12 +15,12 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object d = new DI();
- adapter.add(d, Ice.Util.stringToIdentity("d"));
- adapter.addFacet(d, Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.add(d, communicator.stringToIdentity("d"));
+ adapter.addFacet(d, communicator.stringToIdentity("d"), "facetABCD");
Ice.Object f = new FI();
- adapter.addFacet(f, Ice.Util.stringToIdentity("d"), "facetEF");
+ adapter.addFacet(f, communicator.stringToIdentity("d"), "facetEF");
Ice.Object h = new HI(communicator);
- adapter.addFacet(h, Ice.Util.stringToIdentity("d"), "facetGH");
+ adapter.addFacet(h, communicator.stringToIdentity("d"), "facetGH");
AllTests.allTests(communicator);
diff --git a/java/test/Ice/facets/Server.java b/java/test/Ice/facets/Server.java
index a45525e464f..1b96f6bd22a 100644
--- a/java/test/Ice/facets/Server.java
+++ b/java/test/Ice/facets/Server.java
@@ -15,12 +15,12 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object d = new DI();
- adapter.add(d, Ice.Util.stringToIdentity("d"));
- adapter.addFacet(d, Ice.Util.stringToIdentity("d"), "facetABCD");
+ adapter.add(d, communicator.stringToIdentity("d"));
+ adapter.addFacet(d, communicator.stringToIdentity("d"), "facetABCD");
Ice.Object f = new FI();
- adapter.addFacet(f, Ice.Util.stringToIdentity("d"), "facetEF");
+ adapter.addFacet(f, communicator.stringToIdentity("d"), "facetEF");
Ice.Object h = new HI(communicator);
- adapter.addFacet(h, Ice.Util.stringToIdentity("d"), "facetGH");
+ adapter.addFacet(h, communicator.stringToIdentity("d"), "facetGH");
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/faultTolerance/Server.java b/java/test/Ice/faultTolerance/Server.java
index 167a55f20ef..13dd5cac5d4 100644
--- a/java/test/Ice/faultTolerance/Server.java
+++ b/java/test/Ice/faultTolerance/Server.java
@@ -57,7 +57,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p " + port + ":udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new TestI(adapter, port);
- adapter.add(object, Ice.Util.stringToIdentity("test"));
+ adapter.add(object, communicator.stringToIdentity("test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/hold/Server.java b/java/test/Ice/hold/Server.java
index 99d2530b6a4..cf67f2624a5 100644
--- a/java/test/Ice/hold/Server.java
+++ b/java/test/Ice/hold/Server.java
@@ -14,7 +14,7 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- adapter.add(new HoldI(), Ice.Util.stringToIdentity("hold"));
+ adapter.add(new HoldI(), communicator.stringToIdentity("hold"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/inheritance/Collocated.java b/java/test/Ice/inheritance/Collocated.java
index f692e779b93..2c3bb3c32bf 100644
--- a/java/test/Ice/inheritance/Collocated.java
+++ b/java/test/Ice/inheritance/Collocated.java
@@ -15,7 +15,7 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new InitialI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("initial"));
+ adapter.add(object, communicator.stringToIdentity("initial"));
AllTests.allTests(communicator);
diff --git a/java/test/Ice/inheritance/Server.java b/java/test/Ice/inheritance/Server.java
index 7c0b967fd3a..72f64a3e2dc 100644
--- a/java/test/Ice/inheritance/Server.java
+++ b/java/test/Ice/inheritance/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new InitialI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("initial"));
+ adapter.add(object, communicator.stringToIdentity("initial"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/location/AllTests.java b/java/test/Ice/location/AllTests.java
index 7d5b236698b..5acac13d7d2 100644
--- a/java/test/Ice/location/AllTests.java
+++ b/java/test/Ice/location/AllTests.java
@@ -339,7 +339,7 @@ public class AllTests
try
{
HelloPrx helloPrx = HelloPrxHelper.checkedCast(
- communicator.stringToProxy("\"" + Ice.Util.identityToString(id) + "\""));
+ communicator.stringToProxy("\"" + communicator.identityToString(id) + "\""));
Ice.Connection connection = helloPrx.ice_connection();
test(false);
}
diff --git a/java/test/Ice/location/Server.java b/java/test/Ice/location/Server.java
index 77d07bb07ad..d5f29b1d6e5 100644
--- a/java/test/Ice/location/Server.java
+++ b/java/test/Ice/location/Server.java
@@ -29,15 +29,15 @@ public class Server
// 'servers' created with the server manager interface.
//
ServerLocatorRegistry registry = new ServerLocatorRegistry();
- registry.addObject(adapter.createProxy(Ice.Util.stringToIdentity("ServerManager")));
+ registry.addObject(adapter.createProxy(communicator.stringToIdentity("ServerManager")));
Ice.Object object = new ServerManagerI(adapter, registry);
- adapter.add(object, Ice.Util.stringToIdentity("ServerManager"));
+ adapter.add(object, communicator.stringToIdentity("ServerManager"));
Ice.LocatorRegistryPrx registryPrx =
- Ice.LocatorRegistryPrxHelper.uncheckedCast(adapter.add(registry, Ice.Util.stringToIdentity("registry")));
+ Ice.LocatorRegistryPrxHelper.uncheckedCast(adapter.add(registry, communicator.stringToIdentity("registry")));
ServerLocator locator = new ServerLocator(registry, registryPrx);
- adapter.add(locator, Ice.Util.stringToIdentity("locator"));
+ adapter.add(locator, communicator.stringToIdentity("locator"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/location/ServerManagerI.java b/java/test/Ice/location/ServerManagerI.java
index 112114a0ee9..3cad936b385 100644
--- a/java/test/Ice/location/ServerManagerI.java
+++ b/java/test/Ice/location/ServerManagerI.java
@@ -55,8 +55,8 @@ public class ServerManagerI extends _ServerManagerDisp
adapter2.setLocator(Ice.LocatorPrxHelper.uncheckedCast(locator));
Ice.Object object = new TestI(adapter, adapter2, _registry);
- _registry.addObject(adapter.add(object, Ice.Util.stringToIdentity("test")));
- _registry.addObject(adapter.add(object, Ice.Util.stringToIdentity("test2")));
+ _registry.addObject(adapter.add(object, serverCommunicator.stringToIdentity("test")));
+ _registry.addObject(adapter.add(object, serverCommunicator.stringToIdentity("test2")));
adapter.activate();
adapter2.activate();
diff --git a/java/test/Ice/location/TestI.java b/java/test/Ice/location/TestI.java
index 1b390b650a1..c22a18cf968 100644
--- a/java/test/Ice/location/TestI.java
+++ b/java/test/Ice/location/TestI.java
@@ -17,7 +17,7 @@ public class TestI extends _TestIntfDisp
_adapter2 = adapter2;
_registry = registry;
- _registry.addObject(_adapter1.add(new HelloI(), Ice.Util.stringToIdentity("hello")));
+ _registry.addObject(_adapter1.add(new HelloI(), _adapter1.getCommunicator().stringToIdentity("hello")));
}
public void
@@ -29,19 +29,20 @@ public class TestI extends _TestIntfDisp
public HelloPrx
getHello(Ice.Current current)
{
- return HelloPrxHelper.uncheckedCast(_adapter1.createIndirectProxy(Ice.Util.stringToIdentity("hello")));
+ return HelloPrxHelper.uncheckedCast(_adapter1.createIndirectProxy(
+ _adapter1.getCommunicator().stringToIdentity("hello")));
}
public HelloPrx
getReplicatedHello(Ice.Current current)
{
- return HelloPrxHelper.uncheckedCast(_adapter1.createProxy(Ice.Util.stringToIdentity("hello")));
+ return HelloPrxHelper.uncheckedCast(_adapter1.createProxy(_adapter1.getCommunicator().stringToIdentity("hello")));
}
public void
migrateHello(Ice.Current current)
{
- final Ice.Identity id = Ice.Util.stringToIdentity("hello");
+ final Ice.Identity id = _adapter1.getCommunicator().stringToIdentity("hello");
try
{
_registry.addObject(_adapter2.add(_adapter1.remove(id), id));
diff --git a/java/test/Ice/objects/Collocated.java b/java/test/Ice/objects/Collocated.java
index 69ee5dcd402..693a7314c42 100644
--- a/java/test/Ice/objects/Collocated.java
+++ b/java/test/Ice/objects/Collocated.java
@@ -17,7 +17,7 @@ public class Collocated
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Initial initial = new InitialI(adapter);
- adapter.add(initial, Ice.Util.stringToIdentity("initial"));
+ adapter.add(initial, communicator.stringToIdentity("initial"));
AllTests.allTests(communicator, true);
// We must call shutdown even in the collocated case for cyclic dependency cleanup
initial.shutdown();
diff --git a/java/test/Ice/objects/Server.java b/java/test/Ice/objects/Server.java
index 7c0b967fd3a..72f64a3e2dc 100644
--- a/java/test/Ice/objects/Server.java
+++ b/java/test/Ice/objects/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new InitialI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("initial"));
+ adapter.add(object, communicator.stringToIdentity("initial"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/operations/AllTests.java b/java/test/Ice/operations/AllTests.java
index 6ae5a3c187c..0ddc337abde 100644
--- a/java/test/Ice/operations/AllTests.java
+++ b/java/test/Ice/operations/AllTests.java
@@ -35,8 +35,8 @@ public class AllTests
System.out.print("testing proxy methods... ");
System.out.flush();
- test(Ice.Util.identityToString(
- base.ice_identity(Ice.Util.stringToIdentity("other")).ice_getIdentity()).equals("other"));
+ test(communicator.identityToString(
+ base.ice_identity(communicator.stringToIdentity("other")).ice_getIdentity()).equals("other"));
test(base.ice_facet("facet").ice_getFacet().equals("facet"));
test(base.ice_adapterId("id").ice_getAdapterId().equals("id"));
test(base.ice_twoway().ice_isTwoway());
diff --git a/java/test/Ice/operations/Collocated.java b/java/test/Ice/operations/Collocated.java
index c39aa334315..b9e984dc00d 100644
--- a/java/test/Ice/operations/Collocated.java
+++ b/java/test/Ice/operations/Collocated.java
@@ -14,9 +14,9 @@ public class Collocated
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("test");
+ Ice.Identity id = communicator.stringToIdentity("test");
adapter.add(new MyDerivedClassI(adapter, id), id);
- adapter.add(new TestCheckedCastI(), Ice.Util.stringToIdentity("context"));
+ adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context"));
adapter.activate();
AllTests.allTests(communicator, true);
diff --git a/java/test/Ice/operations/MyDerivedClassI.java b/java/test/Ice/operations/MyDerivedClassI.java
index 6d3c44f9d3a..3715bd37619 100644
--- a/java/test/Ice/operations/MyDerivedClassI.java
+++ b/java/test/Ice/operations/MyDerivedClassI.java
@@ -216,7 +216,7 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
{
p2.value = p1;
p3.value = Test.MyClassPrxHelper.uncheckedCast(
- _adapter.createProxy(Ice.Util.stringToIdentity("noSuchIdentity")));
+ _adapter.createProxy(_adapter.getCommunicator().stringToIdentity("noSuchIdentity")));
return Test.MyClassPrxHelper.uncheckedCast(_adapter.createProxy(_identity));
}
diff --git a/java/test/Ice/operations/Server.java b/java/test/Ice/operations/Server.java
index 5b6fa29073a..d7d387b9150 100644
--- a/java/test/Ice/operations/Server.java
+++ b/java/test/Ice/operations/Server.java
@@ -14,9 +14,9 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("test");
+ Ice.Identity id = communicator.stringToIdentity("test");
adapter.add(new MyDerivedClassI(adapter, id), id);
- adapter.add(new TestCheckedCastI(), Ice.Util.stringToIdentity("context"));
+ adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/operations/Twoways.java b/java/test/Ice/operations/Twoways.java
index b8e62ca877d..63ade37abd3 100644
--- a/java/test/Ice/operations/Twoways.java
+++ b/java/test/Ice/operations/Twoways.java
@@ -118,9 +118,9 @@ class Twoways
test(Ice.Util.proxyIdentityAndFacetCompare(c1.value, p) == 0);
test(Ice.Util.proxyIdentityAndFacetCompare(c2.value, p) != 0);
test(Ice.Util.proxyIdentityAndFacetCompare(r, p) == 0);
- test(c1.value.ice_getIdentity().equals(Ice.Util.stringToIdentity("test")));
- test(c2.value.ice_getIdentity().equals(Ice.Util.stringToIdentity("noSuchIdentity")));
- test(r.ice_getIdentity().equals(Ice.Util.stringToIdentity("test")));
+ test(c1.value.ice_getIdentity().equals(communicator.stringToIdentity("test")));
+ test(c2.value.ice_getIdentity().equals(communicator.stringToIdentity("noSuchIdentity")));
+ test(r.ice_getIdentity().equals(communicator.stringToIdentity("test")));
r.opVoid();
c1.value.opVoid();
try
diff --git a/java/test/Ice/operations/TwowaysAMI.java b/java/test/Ice/operations/TwowaysAMI.java
index 746b9513bd0..c6ac1634f76 100644
--- a/java/test/Ice/operations/TwowaysAMI.java
+++ b/java/test/Ice/operations/TwowaysAMI.java
@@ -286,12 +286,17 @@ class TwowaysAMI
private static class AMI_MyClass_opMyClassI extends Test.AMI_MyClass_opMyClass
{
+ AMI_MyClass_opMyClassI(Ice.Communicator communicator)
+ {
+ _communicator = communicator;
+ }
+
public void
ice_response(Test.MyClassPrx r, Test.MyClassPrx c1, Test.MyClassPrx c2)
{
- test(c1.ice_getIdentity().equals(Ice.Util.stringToIdentity("test")));
- test(c2.ice_getIdentity().equals(Ice.Util.stringToIdentity("noSuchIdentity")));
- test(r.ice_getIdentity().equals(Ice.Util.stringToIdentity("test")));
+ test(c1.ice_getIdentity().equals(_communicator.stringToIdentity("test")));
+ test(c2.ice_getIdentity().equals(_communicator.stringToIdentity("noSuchIdentity")));
+ test(r.ice_getIdentity().equals(_communicator.stringToIdentity("test")));
// We can't do the callbacks below in thread per connection mode.
if(Ice.Util.getDefaultProperties().getPropertyAsInt("Ice.ThreadPerConnection") == 0)
{
@@ -322,6 +327,7 @@ class TwowaysAMI
}
private Callback callback = new Callback();
+ private Ice.Communicator _communicator;
}
private static class AMI_MyClass_opStructI extends Test.AMI_MyClass_opStruct
@@ -1146,7 +1152,7 @@ class TwowaysAMI
}
{
- AMI_MyClass_opMyClassI cb = new AMI_MyClass_opMyClassI();
+ AMI_MyClass_opMyClassI cb = new AMI_MyClass_opMyClassI(communicator);
p.opMyClass_async(cb, p);
test(cb.check());
}
diff --git a/java/test/Ice/operationsAMD/MyDerivedClassI.java b/java/test/Ice/operationsAMD/MyDerivedClassI.java
index e44c08ac310..413881579ad 100644
--- a/java/test/Ice/operationsAMD/MyDerivedClassI.java
+++ b/java/test/Ice/operationsAMD/MyDerivedClassI.java
@@ -259,7 +259,7 @@ public final class MyDerivedClassI extends Test.MyDerivedClass
{
Test.MyClassPrx p2 = p1;
Test.MyClassPrx p3 = Test.MyClassPrxHelper.uncheckedCast(
- _adapter.createProxy(Ice.Util.stringToIdentity("noSuchIdentity")));
+ _adapter.createProxy(_adapter.getCommunicator().stringToIdentity("noSuchIdentity")));
cb.ice_response(Test.MyClassPrxHelper.uncheckedCast(_adapter.createProxy(_identity)), p2, p3);
}
diff --git a/java/test/Ice/operationsAMD/Server.java b/java/test/Ice/operationsAMD/Server.java
index 16a1104ba14..543c7adc2c1 100644
--- a/java/test/Ice/operationsAMD/Server.java
+++ b/java/test/Ice/operationsAMD/Server.java
@@ -14,9 +14,9 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000:udp");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("test");
+ Ice.Identity id = communicator.stringToIdentity("test");
adapter.add(new MyDerivedClassI(adapter, id), id);
- adapter.add(new TestCheckedCastI(), Ice.Util.stringToIdentity("context"));
+ adapter.add(new TestCheckedCastI(), communicator.stringToIdentity("context"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/package/Server.java b/java/test/Ice/package/Server.java
index 540827749f2..f654daa8c1a 100644
--- a/java/test/Ice/package/Server.java
+++ b/java/test/Ice/package/Server.java
@@ -15,7 +15,7 @@ public class Server
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new InitialI();
- adapter.add(object, Ice.Util.stringToIdentity("initial"));
+ adapter.add(object, communicator.stringToIdentity("initial"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/retry/Server.java b/java/test/Ice/retry/Server.java
index 000102c6346..07599c76676 100644
--- a/java/test/Ice/retry/Server.java
+++ b/java/test/Ice/retry/Server.java
@@ -23,7 +23,7 @@ public class Server
}
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- adapter.add(new RetryI(), Ice.Util.stringToIdentity("retry"));
+ adapter.add(new RetryI(), communicator.stringToIdentity("retry"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/Ice/slicing/exceptionsAMD/Server.java b/java/test/Ice/slicing/exceptionsAMD/Server.java
index 838720c51da..26f31323549 100644
--- a/java/test/Ice/slicing/exceptionsAMD/Server.java
+++ b/java/test/Ice/slicing/exceptionsAMD/Server.java
@@ -17,7 +17,7 @@ public class Server
properties.setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new TestI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("Test"));
+ adapter.add(object, communicator.stringToIdentity("Test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/slicing/objectsAMD/Server.java b/java/test/Ice/slicing/objectsAMD/Server.java
index 838720c51da..26f31323549 100644
--- a/java/test/Ice/slicing/objectsAMD/Server.java
+++ b/java/test/Ice/slicing/objectsAMD/Server.java
@@ -17,7 +17,7 @@ public class Server
properties.setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Object object = new TestI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("Test"));
+ adapter.add(object, communicator.stringToIdentity("Test"));
adapter.activate();
communicator.waitForShutdown();
return 0;
diff --git a/java/test/Ice/timeout/Server.java b/java/test/Ice/timeout/Server.java
index 84c2e52d1b2..94d7baa75db 100644
--- a/java/test/Ice/timeout/Server.java
+++ b/java/test/Ice/timeout/Server.java
@@ -23,7 +23,7 @@ public class Server
}
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- adapter.add(new TimeoutI(), Ice.Util.stringToIdentity("timeout"));
+ adapter.add(new TimeoutI(), communicator.stringToIdentity("timeout"));
adapter.activate();
communicator.waitForShutdown();
diff --git a/java/test/IceGrid/simple/Server.java b/java/test/IceGrid/simple/Server.java
index 471203b4b0c..2a70efe8305 100644
--- a/java/test/IceGrid/simple/Server.java
+++ b/java/test/IceGrid/simple/Server.java
@@ -17,7 +17,7 @@ public class Server extends Ice.Application
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
Ice.Object object = new TestI(adapter);
- adapter.add(object, Ice.Util.stringToIdentity("test"));
+ adapter.add(object, communicator().stringToIdentity("test"));
shutdownOnInterrupt();
try
{
diff --git a/java/test/IceSSL/configuration/Server.java b/java/test/IceSSL/configuration/Server.java
index 4cad38214ac..72417152f35 100644
--- a/java/test/IceSSL/configuration/Server.java
+++ b/java/test/IceSSL/configuration/Server.java
@@ -14,7 +14,7 @@ public class Server
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "tcp -p 12010");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter");
- Ice.Identity id = Ice.Util.stringToIdentity("factory");
+ Ice.Identity id = communicator.stringToIdentity("factory");
adapter.add(new ServerFactoryI(), id);
adapter.activate();