diff options
author | Bernard Normier <bernard@zeroc.com> | 2017-01-17 17:06:54 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2017-01-17 17:06:54 -0500 |
commit | 154566dbe9af9b58f24c81697c0f6d644cbdff1a (patch) | |
tree | ac2ee022c38db1b8d9c144ca7a1f39b3af122f7b /java-compat | |
parent | Fixed ICE-7512 and ICE-7511 - make distclean issues with Xcode IceSDK build (diff) | |
download | ice-154566dbe9af9b58f24c81697c0f6d644cbdff1a.tar.bz2 ice-154566dbe9af9b58f24c81697c0f6d644cbdff1a.tar.xz ice-154566dbe9af9b58f24c81697c0f6d644cbdff1a.zip |
"to string" on a fixed proxy no longer raise FixedProxyException
Diffstat (limited to 'java-compat')
-rw-r--r-- | java-compat/src/Ice/src/main/java/IceInternal/FixedReference.java | 8 | ||||
-rw-r--r-- | java-compat/test/src/main/java/test/Ice/proxy/AllTests.java | 20 |
2 files changed, 20 insertions, 8 deletions
diff --git a/java-compat/src/Ice/src/main/java/IceInternal/FixedReference.java b/java-compat/src/Ice/src/main/java/IceInternal/FixedReference.java index ed8532e8d12..ebc59c5e690 100644 --- a/java-compat/src/Ice/src/main/java/IceInternal/FixedReference.java +++ b/java-compat/src/Ice/src/main/java/IceInternal/FixedReference.java @@ -195,14 +195,6 @@ public class FixedReference extends Reference } @Override - public String - toString() - throws Ice.MarshalException - { - throw new Ice.FixedProxyException(); - } - - @Override public java.util.Map<String, String> toProperty(String prefix) { diff --git a/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java b/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java index 23b30d28039..11669609013 100644 --- a/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java +++ b/java-compat/test/src/main/java/test/Ice/proxy/AllTests.java @@ -382,6 +382,26 @@ public class AllTests out.println("ok"); + out.print("testing proxyToString... "); + out.flush(); + b1 = communicator.stringToProxy(ref); + Ice.ObjectPrx b2 = communicator.stringToProxy(communicator.proxyToString(b1)); + test(b1.equals(b2)); + + if(b1.ice_getConnection() != null) // not colloc-optimized target + { + b2 = b1.ice_getConnection().createProxy(Ice.Util.stringToIdentity("fixed")); + String str = communicator.proxyToString(b2); + test(b2.toString().equals(str)); + String str2 = b1.ice_identity(b2.ice_getIdentity()).toString(); + + // Verify that the stringified fixed proxy is the same as a regular stringified proxy + // but without endpoints + test(str2.startsWith(str)); + test(str2.charAt(str.length()) == ':'); + } + out.println("ok"); + out.print("testing propertyToProxy... "); out.flush(); Ice.Properties prop = communicator.getProperties(); |