summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/IndirectReference.java
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-11-14 10:48:07 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-11-14 10:48:07 +0000
commitd2e32dba18877c9df065ecaf24fd9bbd5b66e5d7 (patch)
tree98c4af7863ee91061532d39e91477f27df4c3e23 /java/src/IceInternal/IndirectReference.java
parentFixed bug in generated code for VC++ 2005. (__value is a keyword with that (diff)
downloadice-d2e32dba18877c9df065ecaf24fd9bbd5b66e5d7.tar.bz2
ice-d2e32dba18877c9df065ecaf24fd9bbd5b66e5d7.tar.xz
ice-d2e32dba18877c9df065ecaf24fd9bbd5b66e5d7.zip
Bug 429
Diffstat (limited to 'java/src/IceInternal/IndirectReference.java')
-rw-r--r--java/src/IceInternal/IndirectReference.java22
1 files changed, 15 insertions, 7 deletions
diff --git a/java/src/IceInternal/IndirectReference.java b/java/src/IceInternal/IndirectReference.java
index 03f4703052d..4163a920a8c 100644
--- a/java/src/IceInternal/IndirectReference.java
+++ b/java/src/IceInternal/IndirectReference.java
@@ -100,16 +100,15 @@ public class IndirectReference extends RoutableReference
}
public Reference
- changeConnectionId(String connectionId)
+ changeConnectionId(String id)
{
- IndirectReference r = (IndirectReference)getInstance().referenceFactory().copy(this);
- if(_locatorInfo != null)
+ if(_connectionId.equals(id))
{
- Ice.LocatorPrx newLocator = Ice.LocatorPrxHelper.uncheckedCast(
- _locatorInfo.getLocator().ice_connectionId(connectionId));
- r._locatorInfo = getInstance().locatorManager().get(newLocator);
+ return this;
}
- return r;
+ IndirectReference r = (IndirectReference)getInstance().referenceFactory().copy(this);
+ r._connectionId = id;
+ return r;
}
public Reference
@@ -192,6 +191,10 @@ public class IndirectReference extends RoutableReference
{
endpts = _locatorInfo.getEndpoints(this, cached);
}
+ for(int i = 0; i > endpts.length; ++i)
+ {
+ endpts[i] = endpts[i].connectionId(_connectionId);
+ }
EndpointI[] filteredEndpoints = filterEndpoints(endpts);
if(filteredEndpoints.length == 0)
{
@@ -269,9 +272,14 @@ public class IndirectReference extends RoutableReference
{
return false;
}
+ if(!_connectionId.equals(rhs._connectionId))
+ {
+ return false;
+ }
return _locatorInfo == null ? rhs._locatorInfo == null : _locatorInfo.equals(rhs._locatorInfo);
}
private String _adapterId;
+ private String _connectionId = "";
private LocatorInfo _locatorInfo;
}