scalafix Any2StringAdd

```
% sbt -Dakka.build.scalaVersion=2.13.1
> fixall
```
This commit is contained in:
Bùi Việt Thành 2020-04-16 02:06:36 +07:00
parent 8a40a0ceaa
commit 666988ae57
7 changed files with 10 additions and 9 deletions

View file

@ -4,6 +4,7 @@ rules = [
ExplicitResultTypes
"github:ohze/scalafix-rules/ConstructorProcedureSyntax"
"github:ohze/scalafix-rules/FinalObject"
"github:ohze/scalafix-rules/Any2StringAdd"
]
ExplicitResultTypes {
memberVisibility = [] # only rewrite implicit members

View file

@ -83,7 +83,7 @@ trait DeathWatchSpec { this: AkkaSpec with ImplicitSender with DefaultTimeout =>
"The Death Watch" must {
def expectTerminationOf(actorRef: ActorRef) =
expectMsgPF(5 seconds, actorRef + ": Stopped or Already terminated when linking") {
expectMsgPF(5 seconds, "" + actorRef + ": Stopped or Already terminated when linking") {
case WrappedTerminated(Terminated(`actorRef`)) => true
}

View file

@ -30,7 +30,7 @@ class AskSpec extends AkkaSpec {
f.isCompleted should ===(true)
f.value.get match {
case Failure(_: AskTimeoutException) =>
case v => fail(v + " was not Failure(AskTimeoutException)")
case v => fail("" + v + " was not Failure(AskTimeoutException)")
}
}
@ -41,7 +41,7 @@ class AskSpec extends AkkaSpec {
f.isCompleted should ===(true)
f.value.get match {
case Failure(_: AskTimeoutException) =>
case v => fail(v + " was not Failure(AskTimeoutException)")
case v => fail("" + v + " was not Failure(AskTimeoutException)")
}
}

View file

@ -75,7 +75,7 @@ private[akka] object MessageDispatcher {
if (debug) {
for {
d <- actors.keys
a <- { println(d + " inhabitants: " + d.inhabitants); actors.valueIterator(d) }
a <- { println("" + d + " inhabitants: " + d.inhabitants); actors.valueIterator(d) }
} {
val status = if (a.isTerminated) " (terminated)" else " (alive)"
val messages = a match {

View file

@ -265,7 +265,7 @@ private[akka] abstract class Mailbox(val messageQueue: MessageQueue)
if (shouldProcessMessage) {
val next = dequeue()
if (next ne null) {
if (Mailbox.debug) println(actor.self + " processing message " + next)
if (Mailbox.debug) println("" + actor.self + " processing message " + next)
actor.invoke(next)
if (Thread.interrupted())
throw new InterruptedException("Interrupted while processing actor messages")
@ -289,7 +289,7 @@ private[akka] abstract class Mailbox(val messageQueue: MessageQueue)
val msg = messageList.head
messageList = messageList.tail
msg.unlink()
if (debug) println(actor.self + " processing system message " + msg + " with " + actor.childrenRefs)
if (debug) println("" + actor.self + " processing system message " + msg + " with " + actor.childrenRefs)
// we know here that systemInvoke ensures that only "fatal" exceptions get rethrown
actor.systemInvoke(msg)
if (Thread.interrupted())
@ -468,7 +468,7 @@ private[akka] trait DefaultSystemMessageQueue { self: Mailbox =>
@tailrec
final def systemEnqueue(receiver: ActorRef, message: SystemMessage): Unit = {
assert(message.unlinked)
if (Mailbox.debug) println(receiver + " having enqueued " + message)
if (Mailbox.debug) println("" + receiver + " having enqueued " + message)
val currentList = systemQueueGet
if (currentList.head == NoMessage) {
if (actor ne null) actor.dispatcher.mailboxes.deadLetterMailbox.systemEnqueue(receiver, message)

View file

@ -226,7 +226,7 @@ class RemotingSpec extends AkkaSpec(RemotingSpec.cfg) with ImplicitSender with D
"support ask" in {
Await.result(here ? "ping", timeout.duration) match {
case ("pong", _: akka.pattern.PromiseActorRef) => // good
case m => fail(m + " was not (pong, AskActorRef)")
case m => fail("" + m + " was not (pong, AskActorRef)")
}
}

View file

@ -276,7 +276,7 @@ class CallingThreadDispatcher(_configurator: MessageDispatcherConfigurator) exte
}
if (handle ne null) {
try {
if (Mailbox.debug) println(mbox.actor.self + " processing message " + handle)
if (Mailbox.debug) println("" + mbox.actor.self + " processing message " + handle)
mbox.actor.invoke(handle)
intex = checkThreadInterruption(intex)
true