summaryrefslogtreecommitdiff
path: root/objective-c
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-07-27 19:30:37 -0400
committerBernard Normier <bernard@zeroc.com>2016-07-27 19:30:37 -0400
commit883edab4361e58957796f25d5fc55cfb41f0f6ea (patch)
treefc90adc372b66bf0becf4c0912794c64af250a29 /objective-c
parentICE-7242 - Cross test updates (diff)
downloadice-883edab4361e58957796f25d5fc55cfb41f0f6ea.tar.bz2
ice-883edab4361e58957796f25d5fc55cfb41f0f6ea.tar.xz
ice-883edab4361e58957796f25d5fc55cfb41f0f6ea.zip
Deprecate Communicator::stringToIdentity and identityToString
Diffstat (limited to 'objective-c')
-rw-r--r--objective-c/include/objc/Ice/Initialize.h2
-rw-r--r--objective-c/src/Ice/CommunicatorI.mm24
-rw-r--r--objective-c/src/Ice/Initialize.mm33
-rw-r--r--objective-c/test/Ice/acm/Server.m2
-rw-r--r--objective-c/test/Ice/acm/TestI.m2
-rw-r--r--objective-c/test/Ice/adapterDeactivation/Collocated.m2
-rw-r--r--objective-c/test/Ice/adapterDeactivation/Server.m2
-rw-r--r--objective-c/test/Ice/admin/AllTests.m2
-rw-r--r--objective-c/test/Ice/admin/Server.m2
-rw-r--r--objective-c/test/Ice/ami/Collocated.m4
-rw-r--r--objective-c/test/Ice/ami/Server.m4
-rw-r--r--objective-c/test/Ice/binding/AllTests.m2
-rw-r--r--objective-c/test/Ice/binding/Server.m2
-rw-r--r--objective-c/test/Ice/binding/TestI.m2
-rw-r--r--objective-c/test/Ice/dispatcher/Collocated.m4
-rw-r--r--objective-c/test/Ice/dispatcher/Server.m4
-rw-r--r--objective-c/test/Ice/enums/Server.m2
-rw-r--r--objective-c/test/Ice/exceptions/AllTests.m10
-rw-r--r--objective-c/test/Ice/exceptions/Collocated.m2
-rw-r--r--objective-c/test/Ice/exceptions/Server.m6
-rw-r--r--objective-c/test/Ice/facets/AllTests.m26
-rw-r--r--objective-c/test/Ice/facets/Collocated.m8
-rw-r--r--objective-c/test/Ice/facets/Server.m8
-rw-r--r--objective-c/test/Ice/faultTolerance/Server.m2
-rw-r--r--objective-c/test/Ice/hold/Server.m4
-rw-r--r--objective-c/test/Ice/info/Server.m2
-rw-r--r--objective-c/test/Ice/inheritance/Collocated.m2
-rw-r--r--objective-c/test/Ice/inheritance/Server.m2
-rw-r--r--objective-c/test/Ice/location/AllTests.m2
-rw-r--r--objective-c/test/Ice/location/Server.m8
-rw-r--r--objective-c/test/Ice/location/TestI.m15
-rw-r--r--objective-c/test/Ice/metrics/Server.m4
-rw-r--r--objective-c/test/Ice/objects/Collocated.m4
-rw-r--r--objective-c/test/Ice/objects/Server.m4
-rw-r--r--objective-c/test/Ice/operations/Collocated.m2
-rw-r--r--objective-c/test/Ice/operations/Server.m2
-rw-r--r--objective-c/test/Ice/operations/TestI.m3
-rw-r--r--objective-c/test/Ice/operations/Twoways.m6
-rw-r--r--objective-c/test/Ice/operations/TwowaysNewAMI.m6
-rw-r--r--objective-c/test/Ice/optional/Server.m2
-rw-r--r--objective-c/test/Ice/proxy/AllTests.m2
-rw-r--r--objective-c/test/Ice/proxy/Collocated.m2
-rw-r--r--objective-c/test/Ice/proxy/Server.m2
-rw-r--r--objective-c/test/Ice/retry/Collocated.m2
-rw-r--r--objective-c/test/Ice/retry/Server.m2
-rw-r--r--objective-c/test/Ice/servantLocator/Collocated.m4
-rw-r--r--objective-c/test/Ice/servantLocator/Server.m4
-rw-r--r--objective-c/test/Ice/slicing/exceptions/Server.m2
-rw-r--r--objective-c/test/Ice/slicing/objects/Server.m2
-rw-r--r--objective-c/test/Ice/timeout/Server.m2
50 files changed, 131 insertions, 118 deletions
diff --git a/objective-c/include/objc/Ice/Initialize.h b/objective-c/include/objc/Ice/Initialize.h
index 14603c81959..5dcaa28eb79 100644
--- a/objective-c/include/objc/Ice/Initialize.h
+++ b/objective-c/include/objc/Ice/Initialize.h
@@ -76,6 +76,8 @@ ICE_API @interface ICEUtil : NSObject
+(NSString*) generateUUID;
+(NSArray*)argsToStringSeq:(int)argc argv:(char*[])argv;
+(void)stringSeqToArgs:(NSArray*)args argc:(int*)argc argv:(char*[])argv;
++(ICEIdentity*) stringToIdentity:(NSString*)str;
++(NSMutableString*) identityToString:(ICEIdentity*)ident;
@end
@interface ICEEncodingVersion(StringConv)
diff --git a/objective-c/src/Ice/CommunicatorI.mm b/objective-c/src/Ice/CommunicatorI.mm
index 94b9314e58e..3110c72e47d 100644
--- a/objective-c/src/Ice/CommunicatorI.mm
+++ b/objective-c/src/Ice/CommunicatorI.mm
@@ -237,32 +237,12 @@
-(ICEIdentity*) stringToIdentity:(NSString*)str
{
- NSException* nsex = nil;
- try
- {
- return [ICEIdentity identityWithIdentity:COMMUNICATOR->stringToIdentity(fromNSString(str))];
- }
- catch(const std::exception& ex)
- {
- nsex = toObjCException(ex);
- }
- @throw nsex;
- return nil; // Keep the compiler happy.
+ return [ICEUtil stringToIdentity:str];
}
-(NSMutableString*) identityToString:(ICEIdentity*)ident
{
- NSException* nsex = nil;
- try
- {
- return [toNSMutableString(COMMUNICATOR->identityToString([ident identity])) autorelease];
- }
- catch(const std::exception& ex)
- {
- nsex = toObjCException(ex);
- }
- @throw nsex;
- return nil; // Keep the compiler happy.
+ return [ICEUtil identityToString:ident];
}
-(id<ICEObjectAdapter>) createObjectAdapter:(NSString*)name;
diff --git a/objective-c/src/Ice/Initialize.mm b/objective-c/src/Ice/Initialize.mm
index b1ea0d6dd38..0e23324738f 100644
--- a/objective-c/src/Ice/Initialize.mm
+++ b/objective-c/src/Ice/Initialize.mm
@@ -12,6 +12,7 @@
#import <CommunicatorI.h>
#import <StreamI.h>
#import <LoggerI.h>
+#import <IdentityI.h>
#import <DispatcherI.h>
#import <BatchRequestInterceptorI.h>
#import <Util.h>
@@ -492,7 +493,7 @@ private:
return [[ns copy] autorelease];
}
-+(void)stringSeqToArgs:(NSArray*)args argc:(int*)argc argv:(char*[])argv;
++(void)stringSeqToArgs:(NSArray*)args argc:(int*)argc argv:(char*[])argv
{
//
// Shift all elements in argv which are present in args to the
@@ -537,6 +538,36 @@ private:
argv[*argc] = 0;
}
}
+
++(ICEIdentity*) stringToIdentity:(NSString*)str
+{
+ NSException* nsex = nil;
+ try
+ {
+ return [ICEIdentity identityWithIdentity:Ice::stringToIdentity(fromNSString(str))];
+ }
+ catch(const std::exception& ex)
+ {
+ nsex = toObjCException(ex);
+ }
+ @throw nsex;
+ return nil; // Keep the compiler happy.
+}
+
++(NSMutableString*) identityToString:(ICEIdentity*)ident
+{
+ NSException* nsex = nil;
+ try
+ {
+ return [toNSMutableString(Ice::identityToString([ident identity])) autorelease];
+ }
+ catch(const std::exception& ex)
+ {
+ nsex = toObjCException(ex);
+ }
+ @throw nsex;
+ return nil; // Keep the compiler happy.
+}
@end
@implementation ICEEncodingVersion(StringConv)
diff --git a/objective-c/test/Ice/acm/Server.m b/objective-c/test/Ice/acm/Server.m
index 0ad0740a725..aef70f88ee1 100644
--- a/objective-c/test/Ice/acm/Server.m
+++ b/objective-c/test/Ice/acm/Server.m
@@ -18,7 +18,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.ACM.Timeout" value:@"0"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
[adapter add:[RemoteCommunicatorI remoteCommunicator]
- identity:[communicator stringToIdentity:@"communicator"]];
+ identity:[ICEUtil stringToIdentity:@"communicator"]];
[adapter activate];
// Disable ready print for further adapters.
diff --git a/objective-c/test/Ice/acm/TestI.m b/objective-c/test/Ice/acm/TestI.m
index 719812690b7..9de5e23b4f2 100644
--- a/objective-c/test/Ice/acm/TestI.m
+++ b/objective-c/test/Ice/acm/TestI.m
@@ -104,7 +104,7 @@
}
_adapter = ICE_RETAIN(adapter);
_testIntf = ICE_RETAIN([TestACMTestIntfPrx uncheckedCast:[_adapter add:[TestACMTestIntfI testIntf]
- identity:[[_adapter getCommunicator] stringToIdentity:@"test"]]]);
+ identity:[ICEUtil stringToIdentity:@"test"]]]);
[_adapter activate];
return self;
diff --git a/objective-c/test/Ice/adapterDeactivation/Collocated.m b/objective-c/test/Ice/adapterDeactivation/Collocated.m
index 159430fc682..cad82e310a7 100644
--- a/objective-c/test/Ice/adapterDeactivation/Collocated.m
+++ b/objective-c/test/Ice/adapterDeactivation/Collocated.m
@@ -16,7 +16,7 @@ run(id<ICECommunicator> communicator)
{
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
- [adapter add:[TestAdapterDeactivationI testIntf] identity:[communicator stringToIdentity:@"test"]];
+ [adapter add:[TestAdapterDeactivationI testIntf] identity:[ICEUtil stringToIdentity:@"test"]];
id<TestAdapterDeactivationTestIntfPrx> adapterDeactivationAllTests(id<ICECommunicator>);
adapterDeactivationAllTests(communicator);
diff --git a/objective-c/test/Ice/adapterDeactivation/Server.m b/objective-c/test/Ice/adapterDeactivation/Server.m
index bc55c8015c1..9220a3e4a5e 100644
--- a/objective-c/test/Ice/adapterDeactivation/Server.m
+++ b/objective-c/test/Ice/adapterDeactivation/Server.m
@@ -16,7 +16,7 @@ run(id<ICECommunicator> communicator)
{
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
- [adapter add:[TestAdapterDeactivationI testIntf] identity:[communicator stringToIdentity:@"test"]];
+ [adapter add:[TestAdapterDeactivationI testIntf] identity:[ICEUtil stringToIdentity:@"test"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/admin/AllTests.m b/objective-c/test/Ice/admin/AllTests.m
index f0d1dfca0ef..99af8b05cfe 100644
--- a/objective-c/test/Ice/admin/AllTests.m
+++ b/objective-c/test/Ice/admin/AllTests.m
@@ -254,7 +254,7 @@ adminAllTests(id<ICECommunicator> communicator)
id<ICECommunicator> com = [ICEUtil createCommunicator:init];
test([com getAdmin] == nil);
- ICEIdentity* ident = [com stringToIdentity:@"test-admin"];
+ ICEIdentity* ident = [ICEUtil stringToIdentity:@"test-admin"];
@try
{
[com createAdmin:nil adminId:ident];
diff --git a/objective-c/test/Ice/admin/Server.m b/objective-c/test/Ice/admin/Server.m
index feb14756b80..486394d0601 100644
--- a/objective-c/test/Ice/admin/Server.m
+++ b/objective-c/test/Ice/admin/Server.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010 -t 10000"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
[adapter add:[TestAdminRemoteCommunicatorFactoryI remoteCommunicatorFactory]
- identity:[communicator stringToIdentity:@"factory"]];
+ identity:[ICEUtil stringToIdentity:@"factory"]];
[adapter activate];
// Disable ready print for further adapters.
diff --git a/objective-c/test/Ice/ami/Collocated.m b/objective-c/test/Ice/ami/Collocated.m
index 8e22c8dfd79..e9496af9fe4 100644
--- a/objective-c/test/Ice/ami/Collocated.m
+++ b/objective-c/test/Ice/ami/Collocated.m
@@ -24,10 +24,10 @@ run(id<ICECommunicator> communicator)
TestAMITestIntfControllerI* testController
= ICE_AUTORELEASE([[TestAMITestIntfControllerI alloc] initWithAdapter:adapter]);
- [adapter add:[TestAMITestIntfI testIntf] identity:[communicator stringToIdentity:@"test"]];
+ [adapter add:[TestAMITestIntfI testIntf] identity:[ICEUtil stringToIdentity:@"test"]];
//[adapter activate]; // Collocated test doesn't need to activate the OA
- [adapter2 add:testController identity:[communicator stringToIdentity:@"testController"]];
+ [adapter2 add:testController identity:[ICEUtil stringToIdentity:@"testController"]];
//[adapter2 activate]; // Collocated test doesn't need to activate the OA
void amiAllTests(id<ICECommunicator>, BOOL);
diff --git a/objective-c/test/Ice/ami/Server.m b/objective-c/test/Ice/ami/Server.m
index 7478d93d4e9..98ccd7b9cce 100644
--- a/objective-c/test/Ice/ami/Server.m
+++ b/objective-c/test/Ice/ami/Server.m
@@ -24,10 +24,10 @@ run(id<ICECommunicator> communicator)
TestAMITestIntfControllerI* testController
= ICE_AUTORELEASE([[TestAMITestIntfControllerI alloc] initWithAdapter:adapter]);
- [adapter add:[TestAMITestIntfI testIntf] identity:[communicator stringToIdentity:@"test"]];
+ [adapter add:[TestAMITestIntfI testIntf] identity:[ICEUtil stringToIdentity:@"test"]];
[adapter activate];
- [adapter2 add:testController identity:[communicator stringToIdentity:@"testController"]];
+ [adapter2 add:testController identity:[ICEUtil stringToIdentity:@"testController"]];
[adapter2 activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/binding/AllTests.m b/objective-c/test/Ice/binding/AllTests.m
index 287bab80c5b..e2fc2ecd0ca 100644
--- a/objective-c/test/Ice/binding/AllTests.m
+++ b/objective-c/test/Ice/binding/AllTests.m
@@ -137,7 +137,7 @@ createTestIntfPrx(NSArray* adapters)
test = [a getTestIntf];
[endpoints addObjectsFromArray:getEndpoints(test)];
}
- NSString* proxy = [[test ice_getCommunicator] identityToString:[test ice_getIdentity]];
+ NSString* proxy = [ICEUtil identityToString:[test ice_getIdentity]];
for(NSString* e in endpoints)
{
proxy = [proxy stringByAppendingString:@":"];
diff --git a/objective-c/test/Ice/binding/Server.m b/objective-c/test/Ice/binding/Server.m
index 268196f5b6b..c7f0bcd1c42 100644
--- a/objective-c/test/Ice/binding/Server.m
+++ b/objective-c/test/Ice/binding/Server.m
@@ -16,7 +16,7 @@ run(id<ICECommunicator> communicator)
{
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
- [adapter add:[RemoteCommunicatorI remoteCommunicator] identity:[communicator stringToIdentity:@"communicator"]];
+ [adapter add:[RemoteCommunicatorI remoteCommunicator] identity:[ICEUtil stringToIdentity:@"communicator"]];
[adapter activate];
// Disable ready print for further adapters.
diff --git a/objective-c/test/Ice/binding/TestI.m b/objective-c/test/Ice/binding/TestI.m
index 006f979d634..d739a6b2543 100644
--- a/objective-c/test/Ice/binding/TestI.m
+++ b/objective-c/test/Ice/binding/TestI.m
@@ -55,7 +55,7 @@
adapter_ = ICE_RETAIN(adapter);
testIntf_ = ICE_RETAIN([TestBindingTestIntfPrx uncheckedCast:[
adapter_ add:[TestBindingI testIntf]
- identity:[[adapter_ getCommunicator] stringToIdentity:@"test"]]]);
+ identity:[ICEUtil stringToIdentity:@"test"]]]);
[adapter_ activate];
return self;
}
diff --git a/objective-c/test/Ice/dispatcher/Collocated.m b/objective-c/test/Ice/dispatcher/Collocated.m
index 94d547bfa4b..2836b039160 100644
--- a/objective-c/test/Ice/dispatcher/Collocated.m
+++ b/objective-c/test/Ice/dispatcher/Collocated.m
@@ -27,10 +27,10 @@ run(id<ICECommunicator> communicator)
ICEObject* object = [TestDispatcherTestIntfI testIntf];
- [adapter add:object identity:[communicator stringToIdentity:@"test"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"test"]];
//[adapter activate]; // Don't activate OA to ensure collocation is used.
- [adapter2 add:testController identity:[communicator stringToIdentity:@"testController"]];
+ [adapter2 add:testController identity:[ICEUtil stringToIdentity:@"testController"]];
//[adapter2 activate]; // Don't activate OA to ensure collocation is used.
TestDispatcherTestIntfPrx* dispatcherAllTests(id<ICECommunicator>);
diff --git a/objective-c/test/Ice/dispatcher/Server.m b/objective-c/test/Ice/dispatcher/Server.m
index 0513b436a7f..f02504b0612 100644
--- a/objective-c/test/Ice/dispatcher/Server.m
+++ b/objective-c/test/Ice/dispatcher/Server.m
@@ -27,10 +27,10 @@ run(id<ICECommunicator> communicator)
ICEObject* object = [TestDispatcherTestIntfI testIntf];
- [adapter add:object identity:[communicator stringToIdentity:@"test"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"test"]];
[adapter activate];
- [adapter2 add:testController identity:[communicator stringToIdentity:@"testController"]];
+ [adapter2 add:testController identity:[ICEUtil stringToIdentity:@"testController"]];
[adapter2 activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/enums/Server.m b/objective-c/test/Ice/enums/Server.m
index b3489bb3c21..7b88065e3da 100644
--- a/objective-c/test/Ice/enums/Server.m
+++ b/objective-c/test/Ice/enums/Server.m
@@ -16,7 +16,7 @@ run(id<ICECommunicator> communicator)
{
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
- [adapter add:[TestEnumTestIntfI testIntf] identity:[communicator stringToIdentity:@"test"]];
+ [adapter add:[TestEnumTestIntfI testIntf] identity:[ICEUtil stringToIdentity:@"test"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/exceptions/AllTests.m b/objective-c/test/Ice/exceptions/AllTests.m
index d701479ed9b..ce4c5aa5640 100644
--- a/objective-c/test/Ice/exceptions/AllTests.m
+++ b/objective-c/test/Ice/exceptions/AllTests.m
@@ -66,20 +66,20 @@ exceptionsAllTests(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter1.Endpoints" value:@"default"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter1"];
ICEObject* obj = [ExceptionsEmptyI empty];
- [adapter add:obj identity:[communicator stringToIdentity:@"x"]];
+ [adapter add:obj identity:[ICEUtil stringToIdentity:@"x"]];
@try
{
- [adapter add:obj identity:[communicator stringToIdentity:@"x"]];
+ [adapter add:obj identity:[ICEUtil stringToIdentity:@"x"]];
test(false);
}
@catch(ICEAlreadyRegisteredException *ex)
{
}
- [adapter remove:[communicator stringToIdentity:@"x"]];
+ [adapter remove:[ICEUtil stringToIdentity:@"x"]];
@try
{
- [adapter remove:[communicator stringToIdentity:@"x"]];
+ [adapter remove:[ICEUtil stringToIdentity:@"x"]];
test(false);
}
@catch(ICENotRegisteredException *ex)
@@ -405,7 +405,7 @@ exceptionsAllTests(id<ICECommunicator> communicator)
tprintf("catching object not exist exception... ");
- ICEIdentity *id_ = [communicator stringToIdentity:@"does not exist"];
+ ICEIdentity *id_ = [ICEUtil stringToIdentity:@"does not exist"];
@try
{
id<TestExceptionsThrowerPrx> thrower2 = [TestExceptionsThrowerPrx uncheckedCast:[thrower ice_identity:id_]];
diff --git a/objective-c/test/Ice/exceptions/Collocated.m b/objective-c/test/Ice/exceptions/Collocated.m
index c86e8085226..624d8a4e91d 100644
--- a/objective-c/test/Ice/exceptions/Collocated.m
+++ b/objective-c/test/Ice/exceptions/Collocated.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [ThrowerI thrower];
- [adapter add:object identity:[communicator stringToIdentity:@"thrower"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"thrower"]];
TestExceptionsThrowerPrx* exceptionsAllTests(id<ICECommunicator>);
exceptionsAllTests(communicator);
diff --git a/objective-c/test/Ice/exceptions/Server.m b/objective-c/test/Ice/exceptions/Server.m
index 259d547a884..9f0963a7b4f 100644
--- a/objective-c/test/Ice/exceptions/Server.m
+++ b/objective-c/test/Ice/exceptions/Server.m
@@ -24,9 +24,9 @@ run(id<ICECommunicator> communicator)
id<ICEObjectAdapter> adapter2 = [communicator createObjectAdapter:@"TestAdapter2"];
id<ICEObjectAdapter> adapter3 = [communicator createObjectAdapter:@"TestAdapter3"];
ICEObject* object = [ThrowerI thrower];
- [adapter add:object identity:[communicator stringToIdentity:@"thrower"]];
- [adapter2 add:object identity:[communicator stringToIdentity:@"thrower"]];
- [adapter3 add:object identity:[communicator stringToIdentity:@"thrower"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"thrower"]];
+ [adapter2 add:object identity:[ICEUtil stringToIdentity:@"thrower"]];
+ [adapter3 add:object identity:[ICEUtil stringToIdentity:@"thrower"]];
[adapter activate];
[adapter2 activate];
[adapter3 activate];
diff --git a/objective-c/test/Ice/facets/AllTests.m b/objective-c/test/Ice/facets/AllTests.m
index b20960e9273..7cf76ee0aff 100644
--- a/objective-c/test/Ice/facets/AllTests.m
+++ b/objective-c/test/Ice/facets/AllTests.m
@@ -45,20 +45,20 @@ facetsAllTests(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"FacetExceptionTestAdapter.Endpoints" value:@"default"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"FacetExceptionTestAdapter"];
ICEObject* obj = [FacetsEmptyI empty];
- [adapter add:obj identity:[communicator stringToIdentity:@"d"]];
- [adapter addFacet:obj identity:[communicator stringToIdentity:@"d"] facet:@"facetABCD"];
+ [adapter add:obj identity:[ICEUtil stringToIdentity:@"d"]];
+ [adapter addFacet:obj identity:[ICEUtil stringToIdentity:@"d"] facet:@"facetABCD"];
@try
{
- [adapter addFacet:obj identity:[communicator stringToIdentity:@"d"] facet:@"facetABCD"];
+ [adapter addFacet:obj identity:[ICEUtil stringToIdentity:@"d"] facet:@"facetABCD"];
test(NO);
}
@catch(ICEAlreadyRegisteredException*)
{
}
- [adapter removeFacet:[communicator stringToIdentity:@"d"] facet:@"facetABCD"];
+ [adapter removeFacet:[ICEUtil stringToIdentity:@"d"] facet:@"facetABCD"];
@try
{
- [adapter removeFacet:[communicator stringToIdentity:@"d"] facet:@"facetABCD"];
+ [adapter removeFacet:[ICEUtil stringToIdentity:@"d"] facet:@"facetABCD"];
test(NO);
}
@catch(ICENotRegisteredException*)
@@ -70,27 +70,27 @@ facetsAllTests(id<ICECommunicator> communicator)
ICEObject* obj1 = [FacetsEmptyI empty];
ICEObject* obj2 = [FacetsEmptyI empty];
- [adapter addFacet:obj1 identity:[communicator stringToIdentity:@"id1"] facet:@"f1"];
- [adapter addFacet:obj2 identity:[communicator stringToIdentity:@"id1"] facet:@"f2"];
+ [adapter addFacet:obj1 identity:[ICEUtil stringToIdentity:@"id1"] facet:@"f1"];
+ [adapter addFacet:obj2 identity:[ICEUtil stringToIdentity:@"id1"] facet:@"f2"];
ICEObject* obj3 = [FacetsEmptyI empty];
- [adapter addFacet:obj1 identity:[communicator stringToIdentity:@"id2"] facet:@"f1"];
- [adapter addFacet:obj2 identity:[communicator stringToIdentity:@"id2"] facet:@"f2"];
- [adapter addFacet:obj3 identity:[communicator stringToIdentity:@"id2"] facet:@""];
- NSDictionary* fm = [adapter removeAllFacets:[communicator stringToIdentity:@"id1"]];
+ [adapter addFacet:obj1 identity:[ICEUtil stringToIdentity:@"id2"] facet:@"f1"];
+ [adapter addFacet:obj2 identity:[ICEUtil stringToIdentity:@"id2"] facet:@"f2"];
+ [adapter addFacet:obj3 identity:[ICEUtil stringToIdentity:@"id2"] facet:@""];
+ NSDictionary* fm = [adapter removeAllFacets:[ICEUtil stringToIdentity:@"id1"]];
test([fm count] == 2);
test([fm objectForKey:@"f1"] == obj1);
test([fm objectForKey:@"f2"] == obj2);
@try
{
- [adapter removeAllFacets:[communicator stringToIdentity:@"id1"]];
+ [adapter removeAllFacets:[ICEUtil stringToIdentity:@"id1"]];
test(NO);
}
@catch(ICENotRegisteredException*)
{
}
- fm = [adapter removeAllFacets:[communicator stringToIdentity:@"id2"]];
+ fm = [adapter removeAllFacets:[ICEUtil stringToIdentity:@"id2"]];
test([fm count] == 3);
test([fm objectForKey:@"f1"] == obj1);
test([fm objectForKey:@"f2"] == obj2);
diff --git a/objective-c/test/Ice/facets/Collocated.m b/objective-c/test/Ice/facets/Collocated.m
index b2810cd1cab..6dc77865cff 100644
--- a/objective-c/test/Ice/facets/Collocated.m
+++ b/objective-c/test/Ice/facets/Collocated.m
@@ -19,10 +19,10 @@ run(id<ICECommunicator> communicator)
ICEObject* d = [TestFacetsDI d];
ICEObject* f = [TestFacetsFI f];
ICEObject* h = [TestFacetsHI h];
- [adapter add:d identity:[communicator stringToIdentity:@"d"]];
- [adapter addFacet:d identity:[communicator stringToIdentity:@"d"] facet:@"facetABCD"];
- [adapter addFacet:f identity:[communicator stringToIdentity:@"d"] facet:@"facetEF"];
- [adapter addFacet:h identity:[communicator stringToIdentity:@"d"] facet:@"facetGH"];
+ [adapter add:d identity:[ICEUtil stringToIdentity:@"d"]];
+ [adapter addFacet:d identity:[ICEUtil stringToIdentity:@"d"] facet:@"facetABCD"];
+ [adapter addFacet:f identity:[ICEUtil stringToIdentity:@"d"] facet:@"facetEF"];
+ [adapter addFacet:h identity:[ICEUtil stringToIdentity:@"d"] facet:@"facetGH"];
id<TestFacetsGPrx> facetsAllTests(id<ICECommunicator>);
facetsAllTests(communicator);
diff --git a/objective-c/test/Ice/facets/Server.m b/objective-c/test/Ice/facets/Server.m
index 1f0d4cde3bd..3c9f52bd776 100644
--- a/objective-c/test/Ice/facets/Server.m
+++ b/objective-c/test/Ice/facets/Server.m
@@ -19,10 +19,10 @@ run(id<ICECommunicator> communicator)
ICEObject* d = [TestFacetsDI d];
ICEObject* f = [TestFacetsFI f];
ICEObject* h = [TestFacetsHI h];
- [adapter add:d identity:[communicator stringToIdentity:@"d"]];
- [adapter addFacet:d identity:[communicator stringToIdentity:@"d"] facet:@"facetABCD"];
- [adapter addFacet:f identity:[communicator stringToIdentity:@"d"] facet:@"facetEF"];
- [adapter addFacet:h identity:[communicator stringToIdentity:@"d"] facet:@"facetGH"];
+ [adapter add:d identity:[ICEUtil stringToIdentity:@"d"]];
+ [adapter addFacet:d identity:[ICEUtil stringToIdentity:@"d"] facet:@"facetABCD"];
+ [adapter addFacet:f identity:[ICEUtil stringToIdentity:@"d"] facet:@"facetEF"];
+ [adapter addFacet:h identity:[ICEUtil stringToIdentity:@"d"] facet:@"facetGH"];
[adapter activate];
diff --git a/objective-c/test/Ice/faultTolerance/Server.m b/objective-c/test/Ice/faultTolerance/Server.m
index fdba3426941..792893cca60 100644
--- a/objective-c/test/Ice/faultTolerance/Server.m
+++ b/objective-c/test/Ice/faultTolerance/Server.m
@@ -54,7 +54,7 @@ run(int argc, char** argv, id<ICECommunicator> communicator)
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [TestI testIntf];
- [adapter add:object identity:[communicator stringToIdentity:@"test"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"test"]];
[adapter activate];
[communicator waitForShutdown];
return EXIT_SUCCESS;
diff --git a/objective-c/test/Ice/hold/Server.m b/objective-c/test/Ice/hold/Server.m
index 6db8bd58c5f..f4f62982764 100644
--- a/objective-c/test/Ice/hold/Server.m
+++ b/objective-c/test/Ice/hold/Server.m
@@ -29,8 +29,8 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter2.ThreadPool.Serialize" value:@"1"];
id<ICEObjectAdapter> adapter2 = [communicator createObjectAdapter:@"TestAdapter2"];
- [adapter1 add:[HoldI hold] identity:[communicator stringToIdentity:@"hold"]];
- [adapter2 add:[HoldI hold] identity:[communicator stringToIdentity:@"hold"]];
+ [adapter1 add:[HoldI hold] identity:[ICEUtil stringToIdentity:@"hold"]];
+ [adapter2 add:[HoldI hold] identity:[ICEUtil stringToIdentity:@"hold"]];
[adapter1 activate];
[adapter2 activate];
diff --git a/objective-c/test/Ice/info/Server.m b/objective-c/test/Ice/info/Server.m
index 7472c0036ea..46c88de1321 100644
--- a/objective-c/test/Ice/info/Server.m
+++ b/objective-c/test/Ice/info/Server.m
@@ -16,7 +16,7 @@ run(id<ICECommunicator> communicator)
{
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
- [adapter add:[TestInfoTestIntfI testIntf] identity:[communicator stringToIdentity:@"test"]];
+ [adapter add:[TestInfoTestIntfI testIntf] identity:[ICEUtil stringToIdentity:@"test"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/inheritance/Collocated.m b/objective-c/test/Ice/inheritance/Collocated.m
index 50e591a3a87..1124cc70f0c 100644
--- a/objective-c/test/Ice/inheritance/Collocated.m
+++ b/objective-c/test/Ice/inheritance/Collocated.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = ICE_AUTORELEASE([[TestInheritanceInitialI alloc] initWithAdapter:adapter]);
- [adapter add:object identity:[communicator stringToIdentity:@"initial"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"initial"]];
id<TestInheritanceInitialPrx> inheritanceAllTests(id<ICECommunicator>);
inheritanceAllTests(communicator);
diff --git a/objective-c/test/Ice/inheritance/Server.m b/objective-c/test/Ice/inheritance/Server.m
index 3ae5a3c4c06..32177bf2c3d 100644
--- a/objective-c/test/Ice/inheritance/Server.m
+++ b/objective-c/test/Ice/inheritance/Server.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = ICE_AUTORELEASE([[TestInheritanceInitialI alloc] initWithAdapter:adapter]);
- [adapter add:object identity:[communicator stringToIdentity:@"initial"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"initial"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/location/AllTests.m b/objective-c/test/Ice/location/AllTests.m
index b1edb7f3c0e..9e7b84754de 100644
--- a/objective-c/test/Ice/location/AllTests.m
+++ b/objective-c/test/Ice/location/AllTests.m
@@ -463,7 +463,7 @@ locationAllTests(id<ICECommunicator> communicator, NSString* ref)
// @try
// {
// id<TestLocationHelloPrx> helloPrx = [TestLocationHelloPrx checkedCast:[communicator stringToProxy:
-// [communicator identityToString:ident]]];
+// [ICEUtil identityToString:ident]]];
// [helloPrx ice_getConnection];
// test(NO);
// }
diff --git a/objective-c/test/Ice/location/Server.m b/objective-c/test/Ice/location/Server.m
index cef03f85d96..b1e9ddd1540 100644
--- a/objective-c/test/Ice/location/Server.m
+++ b/objective-c/test/Ice/location/Server.m
@@ -33,15 +33,15 @@ run(id<ICECommunicator> communicator, ICEInitializationData* initData)
ServerLocatorRegistry* registry = ICE_AUTORELEASE([[ServerLocatorRegistry alloc] init]);
ServerManagerI* serverManager = ICE_AUTORELEASE([[ServerManagerI alloc] init:registry initData:initData]);
- [registry addObject:[adapter createProxy:[communicator stringToIdentity:@"ServerManager"]]];
- [adapter add:serverManager identity:[communicator stringToIdentity:@"ServerManager"]];
+ [registry addObject:[adapter createProxy:[ICEUtil stringToIdentity:@"ServerManager"]]];
+ [adapter add:serverManager identity:[ICEUtil stringToIdentity:@"ServerManager"]];
id<ICELocatorRegistryPrx> registryPrx =
[ICELocatorRegistryPrx uncheckedCast:[adapter add:registry
- identity:[communicator stringToIdentity:@"registry"]]];
+ identity:[ICEUtil stringToIdentity:@"registry"]]];
ServerLocator* locator = ICE_AUTORELEASE([[ServerLocator alloc] init:registry proxy:registryPrx]);
- [adapter add:locator identity:[communicator stringToIdentity:@"locator"]];
+ [adapter add:locator identity:[ICEUtil stringToIdentity:@"locator"]];
[adapter activate];
diff --git a/objective-c/test/Ice/location/TestI.m b/objective-c/test/Ice/location/TestI.m
index df93d7ecde5..20f6438c244 100644
--- a/objective-c/test/Ice/location/TestI.m
+++ b/objective-c/test/Ice/location/TestI.m
@@ -70,9 +70,9 @@
[adapter2 setLocator:[ICELocatorPrx uncheckedCast:locator]];
ICEObject* object = ICE_AUTORELEASE([[TestLocationI alloc] init:adapter adapter2:adapter2 registry:registry_]);
- [registry_ addObject:[adapter add:object identity:[serverCommunicator stringToIdentity:@"test"]]];
- [registry_ addObject:[adapter add:object identity:[serverCommunicator stringToIdentity:@"test2"]]];
- [adapter add:object identity:[serverCommunicator stringToIdentity:@"test3"]];
+ [registry_ addObject:[adapter add:object identity:[ICEUtil stringToIdentity:@"test"]]];
+ [registry_ addObject:[adapter add:object identity:[ICEUtil stringToIdentity:@"test2"]]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"test3"]];
[adapter activate];
[adapter2 activate];
@@ -111,7 +111,7 @@
adapter1_ = ICE_RETAIN(adapter);
adapter2_ = ICE_RETAIN(adapter2);
registry_ = registry;
- [registry_ addObject:[adapter1_ add:[HelloI hello] identity:[[adapter1_ getCommunicator] stringToIdentity:@"hello"]]];
+ [registry_ addObject:[adapter1_ add:[HelloI hello] identity:[ICEUtil stringToIdentity:@"hello"]]];
return self;
}
@@ -131,18 +131,17 @@
-(id<TestLocationHelloPrx>) getHello:(ICECurrent*)current
{
- return [TestLocationHelloPrx uncheckedCast:[adapter1_ createIndirectProxy:[[adapter1_ getCommunicator]
- stringToIdentity:@"hello"]]];
+ return [TestLocationHelloPrx uncheckedCast:[adapter1_ createIndirectProxy:[ICEUtil stringToIdentity:@"hello"]]];
}
-(id<TestLocationHelloPrx>) getReplicatedHello:(ICECurrent*)current
{
- return [TestLocationHelloPrx uncheckedCast:[adapter1_ createProxy:[[adapter1_ getCommunicator] stringToIdentity:@"hello"]]];
+ return [TestLocationHelloPrx uncheckedCast:[adapter1_ createProxy:[ICEUtil stringToIdentity:@"hello"]]];
}
-(void) migrateHello:(ICECurrent*)current
{
- ICEIdentity* ident = [[adapter1_ getCommunicator] stringToIdentity:@"hello"];
+ ICEIdentity* ident = [ICEUtil stringToIdentity:@"hello"];
@try
{
[registry_ addObject:[adapter2_ add:[adapter1_ remove:ident] identity:ident]];
diff --git a/objective-c/test/Ice/metrics/Server.m b/objective-c/test/Ice/metrics/Server.m
index 4f603bd3db4..9c7d255973c 100644
--- a/objective-c/test/Ice/metrics/Server.m
+++ b/objective-c/test/Ice/metrics/Server.m
@@ -18,14 +18,14 @@ run(id<ICECommunicator> communicator)
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [MetricsI metrics];
- [adapter add:object identity:[communicator stringToIdentity:@"metrics"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"metrics"]];
[adapter activate];
[[communicator getProperties] setProperty:@"ControllerAdapter.Endpoints" value:@"default -p 12011"];
id<ICEObjectAdapter> controllerAdapter = [communicator createObjectAdapter:@"ControllerAdapter"];
ICEObject* controller = ICE_AUTORELEASE([[ControllerI alloc] init:adapter]);
- [controllerAdapter add:controller identity:[communicator stringToIdentity:@"controller"]];
+ [controllerAdapter add:controller identity:[ICEUtil stringToIdentity:@"controller"]];
[controllerAdapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/objects/Collocated.m b/objective-c/test/Ice/objects/Collocated.m
index a48559da9da..742bf8e7483 100644
--- a/objective-c/test/Ice/objects/Collocated.m
+++ b/objective-c/test/Ice/objects/Collocated.m
@@ -89,10 +89,10 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
TestObjectsInitialI* initial = [TestObjectsInitialI initial];
- [adapter add:initial identity:[communicator stringToIdentity:@"initial"]];
+ [adapter add:initial identity:[ICEUtil stringToIdentity:@"initial"]];
ICEObject* uoet = ICE_AUTORELEASE([[UnexpectedObjectExceptionTestI alloc] init]);
- [adapter add:uoet identity:[communicator stringToIdentity:@"uoet"]];
+ [adapter add:uoet identity:[ICEUtil stringToIdentity:@"uoet"]];
id<TestObjectsInitialPrx> objectsAllTests(id<ICECommunicator>, bool);
objectsAllTests(communicator, NO);
diff --git a/objective-c/test/Ice/objects/Server.m b/objective-c/test/Ice/objects/Server.m
index 5eef14fbbc5..72c96b730ed 100644
--- a/objective-c/test/Ice/objects/Server.m
+++ b/objective-c/test/Ice/objects/Server.m
@@ -44,10 +44,10 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* initial = [TestObjectsInitialI initial];
- [adapter add:initial identity:[communicator stringToIdentity:@"initial"]];
+ [adapter add:initial identity:[ICEUtil stringToIdentity:@"initial"]];
ICEObject* uoet = ICE_AUTORELEASE([[UnexpectedObjectExceptionTestI alloc] init]);
- [adapter add:uoet identity:[communicator stringToIdentity:@"uoet"]];
+ [adapter add:uoet identity:[ICEUtil stringToIdentity:@"uoet"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/operations/Collocated.m b/objective-c/test/Ice/operations/Collocated.m
index 9d4dad1fea9..b3937a6e441 100644
--- a/objective-c/test/Ice/operations/Collocated.m
+++ b/objective-c/test/Ice/operations/Collocated.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestOperationsAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestOperationsAdapter"];
id<ICEObjectPrx> prx = [adapter add:[TestOperationsMyDerivedClassI myDerivedClass]
- identity:[communicator stringToIdentity:@"test"]];
+ identity:[ICEUtil stringToIdentity:@"test"]];
//[adapter activate]; // Don't activate OA to ensure collocation is used.
test(![prx ice_getConnection]);
diff --git a/objective-c/test/Ice/operations/Server.m b/objective-c/test/Ice/operations/Server.m
index a952f03c4e9..9e422112c88 100644
--- a/objective-c/test/Ice/operations/Server.m
+++ b/objective-c/test/Ice/operations/Server.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestOperationsAdapter.Endpoints" value:@"default -p 12010:udp"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestOperationsAdapter"];
[adapter add:[TestOperationsMyDerivedClassI myDerivedClass]
- identity:[communicator stringToIdentity:@"test"]];
+ identity:[ICEUtil stringToIdentity:@"test"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/operations/TestI.m b/objective-c/test/Ice/operations/TestI.m
index 65ed8d8abf9..ba0cc277153 100644
--- a/objective-c/test/Ice/operations/TestI.m
+++ b/objective-c/test/Ice/operations/TestI.m
@@ -97,8 +97,7 @@
{
*p2 = p1;
*p3 = [TestOperationsMyClassPrx uncheckedCast:[current.adapter
- createProxy:[[current.adapter getCommunicator]
- stringToIdentity:@"noSuchIdentity"]]];
+ createProxy:[ICEUtil stringToIdentity:@"noSuchIdentity"]]];
return [TestOperationsMyClassPrx uncheckedCast:[current.adapter createProxy:[current id_]]];
}
diff --git a/objective-c/test/Ice/operations/Twoways.m b/objective-c/test/Ice/operations/Twoways.m
index 92bfa5ba61e..0ab0ffb8a90 100644
--- a/objective-c/test/Ice/operations/Twoways.m
+++ b/objective-c/test/Ice/operations/Twoways.m
@@ -268,9 +268,9 @@ twoways(id<ICECommunicator> communicator, id<TestOperationsMyClassPrx> p)
test([c1 compareIdentityAndFacet:p] == NSOrderedSame);
test([c2 compareIdentityAndFacet:p] != NSOrderedSame);
test([r compareIdentityAndFacet:p] == NSOrderedSame);
- test([[c1 ice_getIdentity] isEqual:[communicator stringToIdentity:@"test"]]);
- test([[c2 ice_getIdentity]isEqual:[communicator stringToIdentity:@"noSuchIdentity"]]);
- test([[r ice_getIdentity] isEqual:[communicator stringToIdentity:@"test"]]);
+ test([[c1 ice_getIdentity] isEqual:[ICEUtil stringToIdentity:@"test"]]);
+ test([[c2 ice_getIdentity]isEqual:[ICEUtil stringToIdentity:@"noSuchIdentity"]]);
+ test([[r ice_getIdentity] isEqual:[ICEUtil stringToIdentity:@"test"]]);
[r opVoid];
[c1 opVoid];
@try
diff --git a/objective-c/test/Ice/operations/TwowaysNewAMI.m b/objective-c/test/Ice/operations/TwowaysNewAMI.m
index e971bebdd2e..e4966a6e149 100644
--- a/objective-c/test/Ice/operations/TwowaysNewAMI.m
+++ b/objective-c/test/Ice/operations/TwowaysNewAMI.m
@@ -163,9 +163,9 @@
-(void) opMyClassResponse:(id<TestOperationsMyClassPrx>)r p2:(id<TestOperationsMyClassPrx>)c1 p3:(id<TestOperationsMyClassPrx>)c2
{
- test([[c1 ice_getIdentity] isEqual:[[c1 ice_getCommunicator] stringToIdentity:@"test"]]);
- test([[c2 ice_getIdentity] isEqual:[[c1 ice_getCommunicator] stringToIdentity:@"noSuchIdentity"]]);
- test([[r ice_getIdentity] isEqual:[[c1 ice_getCommunicator] stringToIdentity:@"test"]]);
+ test([[c1 ice_getIdentity] isEqual:[ICEUtil stringToIdentity:@"test"]]);
+ test([[c2 ice_getIdentity] isEqual:[ICEUtil stringToIdentity:@"noSuchIdentity"]]);
+ test([[r ice_getIdentity] isEqual:[ICEUtil stringToIdentity:@"test"]]);
// We can't do the callbacks below in connection serialization mode.
if([[[c1 ice_getCommunicator] getProperties] getPropertyAsInt:@"Ice.ThreadPool.Client.Serialize"])
{
diff --git a/objective-c/test/Ice/optional/Server.m b/objective-c/test/Ice/optional/Server.m
index 2aba2329100..9a65e15b5ad 100644
--- a/objective-c/test/Ice/optional/Server.m
+++ b/objective-c/test/Ice/optional/Server.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [InitialI initial];
- [adapter add:object identity:[communicator stringToIdentity:@"initial"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"initial"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/proxy/AllTests.m b/objective-c/test/Ice/proxy/AllTests.m
index a634c147f07..5f595d46687 100644
--- a/objective-c/test/Ice/proxy/AllTests.m
+++ b/objective-c/test/Ice/proxy/AllTests.m
@@ -413,6 +413,8 @@ proxyAllTests(id<ICECommunicator> communicator)
tprintf("testing proxy methods... ");
test([[communicator identityToString:[[base ice_identity:[communicator stringToIdentity:@"other"]] ice_getIdentity]]
isEqualToString:@"other"]);
+ test([[ICEUtil identityToString:[[base ice_identity:[ICEUtil stringToIdentity:@"other"]] ice_getIdentity]]
+ isEqualToString:@"other"]);
test([[[base ice_facet:@"facet"] ice_getFacet] isEqualToString:@"facet"]);
test([[[base ice_adapterId:@"id"] ice_getAdapterId] isEqualToString:@"id"]);
test([[base ice_twoway] ice_isTwoway]);
diff --git a/objective-c/test/Ice/proxy/Collocated.m b/objective-c/test/Ice/proxy/Collocated.m
index b13e97806bc..4e8fb75d907 100644
--- a/objective-c/test/Ice/proxy/Collocated.m
+++ b/objective-c/test/Ice/proxy/Collocated.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
[adapter add:[TestProxyMyDerivedClassI myDerivedClass]
- identity:[communicator stringToIdentity:@"test"]];
+ identity:[ICEUtil stringToIdentity:@"test"]];
//[adapter activate]; //adapter->activate(); // Don't activate OA to ensure collocation is used.
TestProxyMyClassPrx* proxyAllTests(id<ICECommunicator>);
diff --git a/objective-c/test/Ice/proxy/Server.m b/objective-c/test/Ice/proxy/Server.m
index cdd2ffc0e90..0f339cf6016 100644
--- a/objective-c/test/Ice/proxy/Server.m
+++ b/objective-c/test/Ice/proxy/Server.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
[adapter add:[TestProxyMyDerivedClassI myDerivedClass]
- identity:[communicator stringToIdentity:@"test"]];
+ identity:[ICEUtil stringToIdentity:@"test"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/retry/Collocated.m b/objective-c/test/Ice/retry/Collocated.m
index 1bac890a477..a40fc2df4cb 100644
--- a/objective-c/test/Ice/retry/Collocated.m
+++ b/objective-c/test/Ice/retry/Collocated.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [TestRetryRetryI retry];
- [adapter add:object identity:[communicator stringToIdentity:@"retry"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"retry"]];
//[adapter activate]; // Don't activate OA to ensure collocation is used.
TestRetryRetryPrx* retryAllTests(id<ICECommunicator>);
diff --git a/objective-c/test/Ice/retry/Server.m b/objective-c/test/Ice/retry/Server.m
index dc74ce63ceb..3a588109051 100644
--- a/objective-c/test/Ice/retry/Server.m
+++ b/objective-c/test/Ice/retry/Server.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [TestRetryRetryI retry];
- [adapter add:object identity:[communicator stringToIdentity:@"retry"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"retry"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/servantLocator/Collocated.m b/objective-c/test/Ice/servantLocator/Collocated.m
index 6d8478c40d9..e98e08636a8 100644
--- a/objective-c/test/Ice/servantLocator/Collocated.m
+++ b/objective-c/test/Ice/servantLocator/Collocated.m
@@ -66,8 +66,8 @@ run(id<ICECommunicator> communicator)
[adapter addServantLocator:ICE_AUTORELEASE([[ServantLocatorI alloc] init:@""]) category:@""];
[adapter addServantLocator:ICE_AUTORELEASE([[ServantLocatorI alloc] init:@"category"]) category:@"category"];
- [adapter add:[TestServantLocatorTestIntfI testIntf] identity:[communicator stringToIdentity:@"asm"]];
- [adapter add:[TestActivationI testActivation] identity:[communicator stringToIdentity:@"test/activation"]];
+ [adapter add:[TestServantLocatorTestIntfI testIntf] identity:[ICEUtil stringToIdentity:@"asm"]];
+ [adapter add:[TestActivationI testActivation] identity:[ICEUtil stringToIdentity:@"test/activation"]];
TestServantLocatorTestIntfPrx* servantLocatorAllTests(id<ICECommunicator>);
servantLocatorAllTests(communicator);
diff --git a/objective-c/test/Ice/servantLocator/Server.m b/objective-c/test/Ice/servantLocator/Server.m
index 922e19b31d3..f2c342caaf1 100644
--- a/objective-c/test/Ice/servantLocator/Server.m
+++ b/objective-c/test/Ice/servantLocator/Server.m
@@ -66,8 +66,8 @@ run(id<ICECommunicator> communicator)
[adapter addServantLocator:ICE_AUTORELEASE([[ServantLocatorI alloc] init:@""]) category:@""];
[adapter addServantLocator:ICE_AUTORELEASE([[ServantLocatorI alloc] init:@"category"]) category:@"category"];
- [adapter add:[TestServantLocatorTestIntfI testIntf] identity:[communicator stringToIdentity:@"asm"]];
- [adapter add:[TestActivationI testActivation] identity:[communicator stringToIdentity:@"test/activation"]];
+ [adapter add:[TestServantLocatorTestIntfI testIntf] identity:[ICEUtil stringToIdentity:@"asm"]];
+ [adapter add:[TestActivationI testActivation] identity:[ICEUtil stringToIdentity:@"test/activation"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/slicing/exceptions/Server.m b/objective-c/test/Ice/slicing/exceptions/Server.m
index 3df6ff8e516..657b20d1f61 100644
--- a/objective-c/test/Ice/slicing/exceptions/Server.m
+++ b/objective-c/test/Ice/slicing/exceptions/Server.m
@@ -18,7 +18,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [TestSlicingExceptionsServerI testIntf];
- [adapter add:object identity:[communicator stringToIdentity:@"Test"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"Test"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/slicing/objects/Server.m b/objective-c/test/Ice/slicing/objects/Server.m
index d913f6c1781..40380311a33 100644
--- a/objective-c/test/Ice/slicing/objects/Server.m
+++ b/objective-c/test/Ice/slicing/objects/Server.m
@@ -19,7 +19,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [TestSlicingObjectsServerI testIntf];
- [adapter add:object identity:[communicator stringToIdentity:@"Test"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"Test"]];
[adapter activate];
serverReady(communicator);
diff --git a/objective-c/test/Ice/timeout/Server.m b/objective-c/test/Ice/timeout/Server.m
index 25662b9a00d..12c2f311ffd 100644
--- a/objective-c/test/Ice/timeout/Server.m
+++ b/objective-c/test/Ice/timeout/Server.m
@@ -17,7 +17,7 @@ run(id<ICECommunicator> communicator)
[[communicator getProperties] setProperty:@"TestAdapter.Endpoints" value:@"default -p 12010:udp"];
id<ICEObjectAdapter> adapter = [communicator createObjectAdapter:@"TestAdapter"];
ICEObject* object = [TimeoutI timeout];
- [adapter add:object identity:[communicator stringToIdentity:@"timeout"]];
+ [adapter add:object identity:[ICEUtil stringToIdentity:@"timeout"]];
[adapter activate];
serverReady(communicator);