summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/src')
-rw-r--r--java/src/Ice/CommunicatorI.java2
-rw-r--r--java/src/Ice/ObjectImpl.java33
-rw-r--r--java/src/IceInternal/ReferenceFactory.java3
3 files changed, 36 insertions, 2 deletions
diff --git a/java/src/Ice/CommunicatorI.java b/java/src/Ice/CommunicatorI.java
index fddeecf9588..292f28d82a5 100644
--- a/java/src/Ice/CommunicatorI.java
+++ b/java/src/Ice/CommunicatorI.java
@@ -162,7 +162,7 @@ public final class CommunicatorI extends LocalObjectImpl implements Communicator
finalize()
throws Throwable
{
- if(!_destroyed)
+ if(!_instance.destroyed())
{
_instance.logger().warning("Ice::Communicator::destroy() has not been called");
}
diff --git a/java/src/Ice/ObjectImpl.java b/java/src/Ice/ObjectImpl.java
index f2ee108265f..d18e0c4502c 100644
--- a/java/src/Ice/ObjectImpl.java
+++ b/java/src/Ice/ObjectImpl.java
@@ -232,4 +232,37 @@ public abstract class ObjectImpl implements Object, java.lang.Cloneable
__inS.endSlice();
}
+
+ private static String
+ operationModeToString(OperationMode mode)
+ {
+ if(mode == Ice.OperationMode.Normal)
+ {
+ return "::Ice::Normal";
+ }
+ if(mode == Ice.OperationMode.Nonmutating)
+ {
+ return "::Ice::Nonmutating";
+ }
+
+ if(mode == Ice.OperationMode.Idempotent)
+ {
+ return "::Ice::Idempotent";
+ }
+
+ return "???";
+ }
+
+ protected static void
+ __checkMode(OperationMode expected, OperationMode received)
+ {
+ if(expected != received)
+ {
+ Ice.MarshalException ex = new Ice.MarshalException();
+ ex.reason = "unexpected operation mode. expected = "
+ + operationModeToString(expected) + " received = "
+ + operationModeToString(received);
+ throw ex;
+ }
+ }
}
diff --git a/java/src/IceInternal/ReferenceFactory.java b/java/src/IceInternal/ReferenceFactory.java
index c3a35ee46c3..2268d121cb9 100644
--- a/java/src/IceInternal/ReferenceFactory.java
+++ b/java/src/IceInternal/ReferenceFactory.java
@@ -88,7 +88,8 @@ public final class ReferenceFactory
//
// Create new reference
//
- FixedReference ref = new FixedReference(_instance, _communicator, ident, context, facet, mode, fixedConnections);
+ FixedReference ref = new FixedReference(_instance, _communicator, ident, context, facet, mode,
+ fixedConnections);
return updateCache(ref);
}