diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-01-16 13:03:45 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-01-16 13:03:45 +0100 |
commit | 3a7e1fda55a94937c8b9504b116a8b9bc29239ca (patch) | |
tree | c93d574855c871d95b5806bdc817a3ba5c58541b /java/src/IceInternal/Reference.java | |
parent | Fixed ICE-5131 - parsing of -p <version> for proxies, tweaked UDP endpoint de... (diff) | |
download | ice-3a7e1fda55a94937c8b9504b116a8b9bc29239ca.tar.bz2 ice-3a7e1fda55a94937c8b9504b116a8b9bc29239ca.tar.xz ice-3a7e1fda55a94937c8b9504b116a8b9bc29239ca.zip |
Fixed ICE-5143 and ICE-5140: stringified proxy and default raw encoding for opaque endpoints
Diffstat (limited to 'java/src/IceInternal/Reference.java')
-rw-r--r-- | java/src/IceInternal/Reference.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/java/src/IceInternal/Reference.java b/java/src/IceInternal/Reference.java index b750743c252..6b95a8fc920 100644 --- a/java/src/IceInternal/Reference.java +++ b/java/src/IceInternal/Reference.java @@ -363,15 +363,23 @@ public abstract class Reference implements Cloneable if(!_protocol.equals(Ice.Util.Protocol_1_0)) { + // + // We only print the protocol if it's not 1.0. It's fine as + // long as we don't add Ice.Default.ProtocolVersion, a + // stringified proxy will convert back to the same proxy with + // stringToProxy. + // s.append(" -p "); s.append(Ice.Util.protocolVersionToString(_protocol)); } - if(!_encoding.equals(Ice.Util.Encoding_1_0)) - { - s.append(" -e "); - s.append(Ice.Util.encodingVersionToString(_encoding)); - } + // + // Always print the encoding version to ensure a stringified proxy + // will convert back to a proxy with the same encoding with + // stringToProxy (and won't use Ice.Default.EncodingVersion). + // + s.append(" -e "); + s.append(Ice.Util.encodingVersionToString(_encoding)); return s.toString(); |