summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/ReferenceFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/IceInternal/ReferenceFactory.java')
-rw-r--r--java/src/IceInternal/ReferenceFactory.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/src/IceInternal/ReferenceFactory.java b/java/src/IceInternal/ReferenceFactory.java
index 4ec3f1b9fba..16283cf3dbd 100644
--- a/java/src/IceInternal/ReferenceFactory.java
+++ b/java/src/IceInternal/ReferenceFactory.java
@@ -801,7 +801,14 @@ public final class ReferenceFactory
Ice.LocatorPrx locator = Ice.LocatorPrxHelper.uncheckedCast(_communicator.propertyToProxy(property));
if(locator != null)
{
- locatorInfo = _instance.locatorManager().get(locator);
+ if(!((Ice.ObjectPrxHelperBase)locator).__reference().getEncoding().equals(encoding))
+ {
+ locatorInfo = _instance.locatorManager().get((Ice.LocatorPrx)locator.ice_encodingVersion(encoding));
+ }
+ else
+ {
+ locatorInfo = _instance.locatorManager().get(locator);
+ }
}
property = propertyPrefix + ".Router";