Fixed problem with message toString is not lazily evaluated in RemoteClient

This commit is contained in:
Jonas Bonér 2010-11-23 08:36:47 +01:00
parent 6188e708ef
commit 7ee8accfb1

View file

@ -417,8 +417,7 @@ class RemoteClientHandler(
if (result.isInstanceOf[RemoteMessageProtocol]) {
val reply = result.asInstanceOf[RemoteMessageProtocol]
val replyUuid = uuidFrom(reply.getUuid.getHigh, reply.getUuid.getLow)
// log.debug("Remote client received RemoteMessageProtocol[\n%s]".format(request.toString))
log.debug("Remote client received RemoteMessageProtocol[\n%s]", reply.toString)
log.debug("Remote client received RemoteMessageProtocol[\n%s]".format(reply.toString))
val future = futures.get(replyUuid).asInstanceOf[CompletableFuture[Any]]
if (reply.hasMessage) {
if (future eq null) throw new IllegalActorStateException("Future mapped to UUID " + replyUuid + " does not exist")