Changed RuntimeException to IllegalState exception

This commit is contained in:
nathan 2016-03-09 00:47:27 +01:00
parent e1942ae03f
commit 876caf1dc0

View File

@ -60,7 +60,7 @@ class RemoteObjectSerializer<T> extends Serializer<T> {
KryoExtra kryoExtra = (KryoExtra) kryo;
int id = kryoExtra.connection.getRegisteredId(object);
if (id == Integer.MAX_VALUE) {
throw new RuntimeException("Object not found in RMI objectSpace: " + object);
throw new IllegalStateException("Object not found in RMI objectSpace: " + object);
}
output.writeInt(id, true);