Do not perform .toString() on objects passed to loggers -- it will be
invoked automatically if the message is not filtered.
Use a simple character lookup instead of a string.
Change-Id: I262298c767a1363daf3c8f7e83f994e70e0cf6bf
Signed-off-by: Robert Varga <rovarga@cisco.com>
Preconditions.checkArgument(actor != null, "actor must not be null");
Preconditions.checkArgument(message != null, "message must not be null");
Preconditions.checkArgument(actor != null, "actor must not be null");
Preconditions.checkArgument(message != null, "message must not be null");
- LOG.debug("Sending message {} to {}", message.getClass().toString(), actor.toString());
+ LOG.debug("Sending message {} to {}", message.getClass(), actor);
return ask(actor, message, timeout);
}
return ask(actor, message, timeout);
}
Preconditions.checkArgument(actor != null, "actor must not be null");
Preconditions.checkArgument(message != null, "message must not be null");
Preconditions.checkArgument(actor != null, "actor must not be null");
Preconditions.checkArgument(message != null, "message must not be null");
- LOG.debug("Sending message {} to {}", message.getClass().toString(), actor.toString());
+ LOG.debug("Sending message {} to {}", message.getClass(), actor);
return ask(actor, message, timeout);
}
return ask(actor, message, timeout);
}
Preconditions.checkArgument(actor != null, "actor must not be null");
Preconditions.checkArgument(message != null, "message must not be null");
Preconditions.checkArgument(actor != null, "actor must not be null");
Preconditions.checkArgument(message != null, "message must not be null");
- LOG.debug("Sending message {} to {}", message.getClass().toString(), actor.toString());
+ LOG.debug("Sending message {} to {}", message.getClass(), actor);
actor.tell(message, ActorRef.noSender());
}
actor.tell(message, ActorRef.noSender());
}
- int pathAtIndex = path.indexOf("@");
+ int pathAtIndex = path.indexOf('@');
if (pathAtIndex == -1) {
//if the path is of local format, then its local and is co-located
return true;
} else if (selfAddressHostPort != null) {
// self-address and tx actor path, both are of remote path format
if (pathAtIndex == -1) {
//if the path is of local format, then its local and is co-located
return true;
} else if (selfAddressHostPort != null) {
// self-address and tx actor path, both are of remote path format
- int slashIndex = path.indexOf("/", pathAtIndex);
+ int slashIndex = path.indexOf('/', pathAtIndex);
if (slashIndex == -1) {
return false;
if (slashIndex == -1) {
return false;