summaryrefslogtreecommitdiff
path: root/java/test/Ice/exceptions/AllTests.java
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-05-12 16:19:39 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-05-12 16:19:39 +0000
commitf90a2c19d6809e9262b8cdd2d31c92a3da11f348 (patch)
treea5bdbc4c35932d9cfa360fbcfed3ac918f60c29b /java/test/Ice/exceptions/AllTests.java
parentUse commuinicator-stringToIdentity (diff)
downloadice-f90a2c19d6809e9262b8cdd2d31c92a3da11f348.tar.bz2
ice-f90a2c19d6809e9262b8cdd2d31c92a3da11f348.tar.xz
ice-f90a2c19d6809e9262b8cdd2d31c92a3da11f348.zip
Use communicator stringToIdentity
Diffstat (limited to 'java/test/Ice/exceptions/AllTests.java')
-rw-r--r--java/test/Ice/exceptions/AllTests.java22
1 files changed, 14 insertions, 8 deletions
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());
}